Now that we've taken a deep look at the system views provided by PostgreSQL, it's time to configure logging. Fortunately, PostgreSQL provides us with an easy way to work with log files and helps people set up a good configuration easily.
Collecting logs is important because it can point to errors and potential database problems.
The postgresql.conf file contains all the parameters you need so that you're provided with all the necessary information.