about summary refs log tree commit diff
path: root/nixos/modules/services/databases/postgresql.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-05-14 09:25:16 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-05-14 09:25:25 +0200
commit92a26320e7b9bbfe781e222a17c518443f63316a (patch)
treedb6e4fe7706ec8c065d7efe10e93b38ea1b149ba /nixos/modules/services/databases/postgresql.nix
parent2006fd4fc5a20c72ab2166b2b4039307f4f54bcb (diff)
parent85a05878846b75254f97b8690c18a470cfe982f0 (diff)
downloadnixlib-92a26320e7b9bbfe781e222a17c518443f63316a.tar
nixlib-92a26320e7b9bbfe781e222a17c518443f63316a.tar.gz
nixlib-92a26320e7b9bbfe781e222a17c518443f63316a.tar.bz2
nixlib-92a26320e7b9bbfe781e222a17c518443f63316a.tar.lz
nixlib-92a26320e7b9bbfe781e222a17c518443f63316a.tar.xz
nixlib-92a26320e7b9bbfe781e222a17c518443f63316a.tar.zst
nixlib-92a26320e7b9bbfe781e222a17c518443f63316a.zip
Merge master into staging-next
Diffstat (limited to 'nixos/modules/services/databases/postgresql.nix')
-rw-r--r--nixos/modules/services/databases/postgresql.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 93f5c1ca5f55..982480fbd99c 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -17,6 +17,7 @@ let
       hba_file = '${pkgs.writeText "pg_hba.conf" cfg.authentication}'
       ident_file = '${pkgs.writeText "pg_ident.conf" cfg.identMap}'
       log_destination = 'stderr'
+      log_line_prefix = '${cfg.logLinePrefix}'
       listen_addresses = '${if cfg.enableTCPIP then "*" else "localhost"}'
       port = ${toString cfg.port}
       ${cfg.extraConfig}
@@ -186,6 +187,17 @@ in
         '';
       };
 
+      logLinePrefix = mkOption {
+        type = types.str;
+        default = "[%p] ";
+        example = "%m [%p] ";
+        description = ''
+          A printf-style string that is output at the beginning of each log line.
+          Upstream default is <literal>'%m [%p] '</literal>, i.e. it includes the timestamp. We do
+          not include the timestamp, because journal has it anyway.
+        '';
+      };
+
       extraPlugins = mkOption {
         type = types.listOf types.path;
         default = [];