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

  1. Enable statement logging by adding the following argument to the docker db run cmd -c log_statement=all
  2. run the following command to follow the db logs docker logs db -f -n 10
    1. assuming db is the name of the container
    2. -f will tail (follow) the logs
    3. -n 10 will only display the recent 10 lines, remove it to see all historical lines

for more context, view docker logs docs