Re: Proposal: Adding json logging

From: Jordan Deitch <jd(at)rsa(dot)pub>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: David Arnold <dar(at)xoe(dot)solutions>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Proposal: Adding json logging
Date: 2018-04-15 15:46:58
Message-ID: 1523807218.1002452.1338631080.461C5E8C@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Exactly what are you logging here ??? Why would I need to see a
> multi-dimensional array in the log ?

If I wanted to capture the location of errors my clients are encountering on their postgres clusters in detail, I would need to parse the 'LOCATION' string in their log entries, parse out the filename by splitting on the ':' character of that same line, and parse out the line number. Essentially any programmatic analysis of logs, as it stands today, would require string parsing. I'd rather have an organized, logical representation of information which I suggest is not possible in a flat, single dimensional structure.

{
"level":"ERROR",
"meta":{
"line_number":23,
"file": "parse_relation.c",
},
"detail:{
"condition_name"...,
"error_code"...,
},
time:....
}

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Arnold 2018-04-15 15:49:01 Re: Proposal: Adding json logging
Previous Message Dave Cramer 2018-04-15 15:29:18 Re: Proposal: Adding json logging