Basic PostgreSQL log setup
This is what the default settings in the postgresql.conf
setting look like for the main logging setup parameters:
log_destination = 'stderr' logging_collector = off log_line_prefix = '' log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
It's important to know what all these lines mean before changing them:
log_destination
: Write server log messages to the standard error output of the process starting the server. If you started the server manually, these might appear right on your console. If you sent the server output to another spot, either using thepg_ctl -l
option or by using command line redirection, they'll go to the file you specified there instead.logging_collector
: Off means don't collect the information written to standard error to redirect it somewhere else.log_line_prefix
: An empty string means don't add anything to the beginning.log_directory
: When the logging...