How to log postgres queries in database?

I have a docker container running for Postgres which is handling my elixir server. So I want to log every query which I’m hitting from my API’s. So the docker is running already.

If anyone has done this please let me know

Question no 1 - what for? Is it during development or in production?

It’s during development