3.1.2 Ensure the log destinations are set correctly

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

PostgreSQL supports several methods for logging server messages, including stderr, csvlog, syslog, and jsonlog. On Windows, eventlog is also supported. One or more of these destinations should be set for server log output.

Rationale:

If log_destination is not set, then any log messages generated by the core PostgreSQL processes will be lost.

Solution

Execute the following SQL statements to remediate this setting (in this example, setting the log destination to csvlog):

postgres=# alter system set log_destination = 'csvlog';
ALTER SYSTEM
postgres=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)

Note: If more than one log destination is to be used, set this parameter to a list of desired log destinations separated by commas (e.g. 'csvlog, stderr').

Default Value:

stderr

See Also

https://workbench.cisecurity.org/benchmarks/11864