feat: log pid and user in request logs (#21267)

This commit is contained in:
Sagar Vora 2023-06-08 19:43:29 +05:30 committed by GitHub
parent e98519211e
commit e1764d5a4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,6 +157,8 @@ def log_request(request, response):
{
"site": get_site_name(request.host),
"remote_addr": getattr(request, "remote_addr", "NOTFOUND"),
"pid": os.getpid(),
"user": getattr(frappe.local.session, "user", "NOTFOUND"),
"base_url": getattr(request, "base_url", "NOTFOUND"),
"full_path": getattr(request, "full_path", "NOTFOUND"),
"method": getattr(request, "method", "NOTFOUND"),