Skip to content

Log local DB queries

Zedd Shmais edited this page Nov 28, 2022 · 2 revisions

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

Local development

Setup

How to

Development process and standards

Oncall

Technical resources

How-to guides

Environments/Azure

Misc

?

Clone this wiki locally