summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2013-10-28 18:14:49 +0100
committerJaka Hudoklin <jakahudoklin@gmail.com>2013-10-28 18:18:24 +0100
commitd28a9619a1d48b0885a027aa0ad976966f7778eb (patch)
treec02fce6f9fbaeb1378b8fd0b3835212587cfa0f8 /nixos/modules/services/databases
parentb20c08d2cb85ba9e2b2f45f0b57b6cd77d2f66c9 (diff)
downloadnixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.tar
nixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.tar.gz
nixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.tar.bz2
nixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.tar.lz
nixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.tar.xz
nixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.tar.zst
nixlib-d28a9619a1d48b0885a027aa0ad976966f7778eb.zip
nixos/redis: log to syslog by default
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/redis.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 059b157498de..ea6399ba4f44 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -14,6 +14,7 @@ let
     ${condOption "unixsocket" cfg.unixSocket}
     loglevel ${cfg.logLevel}
     logfile ${cfg.logfile}
+    syslog-enabled ${redisBool cfg.syslog}
     databases ${toString cfg.databases}
     ${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save}
     dbfilename ${cfg.dbFilename}
@@ -82,12 +83,18 @@ in
       };
 
       logfile = mkOption {
-        default = "stdout";
+        default = "/dev/null";
         description = "Specify the log file name. Also 'stdout' can be used to force Redis to log on the standard output.";
         example = "/var/log/redis.log";
         type = with types; string;
       };
 
+      syslog = mkOption {
+        default = true;
+        description = "Enable logging to the system logger.";
+        type = with types; bool;
+      };
+
       databases = mkOption {
         default = 16;
         description = "Set the number of databases.";