Logger - PostgreSQL
PostgreSQL
- Edit the PostgreSQL configuration file:
sudo nano /etc/postgresql/{version}/main/postgresql.conf
Windows system
C:\Program Files
(x86)\ManageEngine\AppManager12\working\pgsql\data\amdb\postgresql.conf
-
Add or modify the following settings:
log_statement = 'all' logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d.log'
-
Restart PostgreSQL:
sudo systemctl restart postgresql
Restart the service.
services.msc
- view logs
C:\Program Files (x86)\ManageEngine\AppManager12\working\pgsql\data\amdb\pgsql_log\
swissql*
login
sudo -u postgres psql postgres