log_directory

A configuration parameter determining the directory where log files are stored

log_directory is a configuration parameter determining the directory on the local file system where log files are stored.

log_directory was added in PostgreSQL 8.0.

Default value

The default value for log_directory is:

Usage

log_directory is only applied when logging_collector is set to on. The directory can be specified as an absolute path (e.g. /var/log/postgresql) or relative to the data directory (e.g. log).

Note that it is possible to set log_directory to an arbitrary subdirectory within the data directory (e.g. pg_replslot) but this is not recommended and may lead to unexpected side-effects.

The current value of log_directory can only be viewed by superusers or members of the default role pg_read_all_settings.

Change history

Categories

GUC configuration item, Logging

See also

logging_collector, pg_current_logfile()