postgREST log add customs fields #3152
-
Hi all , I need one help 127.0.0.1 - postgres [10/Jan/2024:10:55:27 +0530] "GET /subscription_user_role_mapping?UserId=eq.110000 HTTP/1.1" 200 - "http://localhost:3000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" I need to add userid in this log like **that user id i send headers userid filed is there any options available for add new filed in log format ?** |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hm, so you want to duplicate the query parameter ( |
Beta Was this translation helpful? Give feedback.
Ah, so you want to surface some headers to the log line.
For now you could do it with Nginx like so https://ruslan.rocks/posts/nginx-log-headers
For PostgREST itself, there's currently now way to do this. Maybe open an issue requesting a config similar to Nginx's
log_format
.