How can I enable query logging in YSQL?

[Question posted by a user on YugabyteDB Community Slack ]

How can I enable query logging in YSQL ?

Query logging can be enabled using the --ysql_log_statement gflag in yb-tserver like explained in https://docs.yugabyte.com/latest/reference/configuration/yb-tserver/#ysql-log-statement.

The query logs will show in postgres*.log files in the logging dir (how to find logs).