13
Server Message Log
Message receiver (log_destination = list)
stderr error stream
csvlog CSV format (if the collector is enabled)
jsonlog JSON format (if the collector is enabled)
syslog the syslog daemon
eventlog Windows event log
Message collector (logging_collector = on)
can provide additional info
never loses messages (unlike syslog)
writes stderr, csvlog and jsonlog to the log_directory/log_filename
The server log can be output in various formats and forwarded to various
destinations. The format and the destination are determined primarily by the
log_destination parameter (you can list multiple receivers separated by a
comma).
The stderr value (on by default) sends messages to the standard error
stream as plain text. The syslog value forwards messages to the syslog
daemon (for Unix systems), and the eventlog value does the same for the
Windows event log.
The message collector is an auxiliary process that collects additional
information from all PostgreSQL processes to supplement the basic log
messages. It is designed to keep track of every message, therefore it can
become the bottleneck in high-load environments.
The message collector is switched on and off by the logging_collector
parameter. When stderr is enabled, the messages are written into the file
defined by the log_filename parameter, which is located in the directory
defined by the log_directory parameter.
When the collector is on and csvlog is selected as a receiver, the info will
also be output into a CSV file log_filename.csv. With the jsonlog output
enabled, log files are written in JSON format and use the .json file extension.