A configuration parameter determining the log file name

log_filename is a configuration parameter determining the filename of log files stored on the local file system.

log_filename was added in PostgreSQL 8.0.


The default value for log_filename is: postgresql-%Y-%m-%d_%H%M%S.log


The filename format is treated as a strftime pattern, with the %-escapes being similar to those listed in the Open Group strftime specification. Note that the local system's strftime is not used directly, and non-standard extensions to the format are not supported. For further details on PostgreSQL's strftime implementation, see: src/timezone/strftime.c.

Change history


GUC configuration item, Logging

See also

log_directory, log_destination, pg_current_logfile()