#How to add keyword to log output in PostgreSQL?

4 messages · Page 1 of 1 (latest)

fiery fox
#

I want to make it so that there would be a keyword in the logs before the request author, in this line it is "postgres", please tell me how to get it?

2023-08-09 14:23:05.910 PL,"postgres","postgres",1212,"::1:50120",64d37719.4bc,2,"",2023-08-09 14:23:05 MSK,3/16,0,LOG,00000,"connection authorized: user=postgres database=postgres application_name=HeidiSQL",,,,,,,,,"","client backend",,0```

I wanted to implement this through the postgreSQL config `log_line_prefix = 'user=%u'`, but it didn’t work, if you know how it can be implemented, tell me, the config option would be the most convenient for me
patent crystalBOT
#

This post has been reserved for your question.

Hey @fiery fox! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.