Log local DB queries - CDCgov/prime-simplereport GitHub Wiki
follow the next steps to view all the query statements issued on your local postgres db
- Enable statement logging by adding the following argument to the docker db run cmd
-c log_statement=all
- run the following command to follow the db logs
docker logs db -f -n 10
- assuming
db
is the name of the container -f
will tail (follow) the logs-n 10
will only display the recent 10 lines, remove it to see all historical lines
- assuming
for more context, view docker logs docs