@@ -17,6 +17,7 @@ let
1717 hba_file = '${pkgs.writeText "pg_hba.conf" cfg.authentication}'
1818 ident_file = '${pkgs.writeText "pg_ident.conf" cfg.identMap}'
1919 log_destination = 'stderr'
20+ log_line_prefix = '${cfg.logLinePrefix}'
2021 listen_addresses = '${if cfg.enableTCPIP then "*" else "localhost"}'
2122 port = ${toString cfg.port}
2223 ${cfg.extraConfig}
@@ -192,6 +193,17 @@ in
192193 '';
193194 };
194195
196+ logLinePrefix = mkOption {
197+ type = types.str;
198+ default = "[%p] ";
199+ example = "%m [%p] ";
200+ description = ''
201+ A printf-style string that is output at the beginning of each log line.
202+ Upstream default is '%m [%p] ', i.e. it includes the timestamp. We do
203+ not include the timestamp, because journal has it anyway.
204+ '';
205+ };
206+
195207 extraPlugins = mkOption {
196208 type = types.listOf types.path;
197209 default = [];