0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #198142 from SuperSandro2000/nextcloud-logType

nixos/nextcloud: allow changing logType
This commit is contained in:
Maximilian Bosch 2022-10-31 10:57:00 +01:00 committed by GitHub
commit 2d79fdf801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -148,6 +148,15 @@ in {
default = 2; default = 2;
description = lib.mdDoc "Log level value between 0 (DEBUG) and 4 (FATAL)."; description = lib.mdDoc "Log level value between 0 (DEBUG) and 4 (FATAL).";
}; };
logType = mkOption {
type = types.enum [ "errorlog" "file" "syslog" "systemd" ];
default = "syslog";
description = lib.mdDoc ''
Logging backend to use.
systemd requires the php-systemd package to be added to services.nextcloud.phpExtraExtensions.
See the [nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html) for details.
'';
};
https = mkOption { https = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -758,7 +767,7 @@ in {
'datadirectory' => '${datadir}/data', 'datadirectory' => '${datadir}/data',
'skeletondirectory' => '${cfg.skeletonDirectory}', 'skeletondirectory' => '${cfg.skeletonDirectory}',
${optionalString cfg.caching.apcu "'memcache.local' => '\\OC\\Memcache\\APCu',"} ${optionalString cfg.caching.apcu "'memcache.local' => '\\OC\\Memcache\\APCu',"}
'log_type' => 'syslog', 'log_type' => '${cfg.logType}',
'loglevel' => '${builtins.toString cfg.logLevel}', 'loglevel' => '${builtins.toString cfg.logLevel}',
${optionalString (c.overwriteProtocol != null) "'overwriteprotocol' => '${c.overwriteProtocol}',"} ${optionalString (c.overwriteProtocol != null) "'overwriteprotocol' => '${c.overwriteProtocol}',"}
${optionalString (c.dbname != null) "'dbname' => '${c.dbname}',"} ${optionalString (c.dbname != null) "'dbname' => '${c.dbname}',"}