Join more than 25k Postgres enthusiasts and sign up for our newsletter!

Step 4: Adjust Postgres log_line_prefix

By default Azure uses %t-%c- as the log_line_prefix setting. Whilst we support this setting, we recommend you utilize the following log_line_prefix parameter value instead:

log_line_prefix = '%m [%p] %q[user=%u,db=%d,app=%a] '

To set the log_line_prefix, copy the above value inside the single quotes. Note there is a trailing space at the end of the parameter value, which is required.

Then go to the "Server parameters" section of your database instance to change the setting:

Screenshot of changing log_line_prefix setting in Azure Portal

The correct setting for log_line_prefix ensures that the collector can associate each log line to the correct session, database and username.

Continue to Step 5: Configure collector

Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →