How do I dump the PostgreSQL error log?

PostgreSQL has at least three parameters in its postgresql.conf file that control how error logs are cycled. These parameters can also be used on the command line.They are:



ParameterUse
log_ rotation_ agePasses the number of minutes after which a new log is to be created. Set to zero to disable.For use with redirect_ stderr.
log_ rotation_ sizePasses the maximum size of the log file in kilobytes. Once the log file reaches that size, a new log is created. Set to zero to disable. For use with redirect_ stderr.
log_ truncate_ on_ rotationCauses PostgreSQL to truncate rather than overwrite logs.






You should consult the following PostgreSQL documentation as PostgreSQL log dumping and cycling is fairly sophisticated:



http://www.postgresql.org/docs/current/static/runtime-config-logging.html