On 2021-Aug-13, Ronan Dunklau wrote:
> ereport(NOTICE,
> (errmsg("My log message")),
> (errtag("EMITTER", "MYEXTENSION")),
> (errtag("MSG-ID", "%d", error_message_id))
> );
Interesting idea. I agree this would be useful.
> Please find attached a very small POC patch to better demonstrate what I
> propose.
Seems like a good start. I think a further step towards a committable
patch would include a test module that uses the new tagging
functionality.
> On a related note, the only structured logger we have in-core is the CSV
> logger. Many users nowadays end up feeding the logs to journald either by
> capturing the stderr output with systemd, or by having syslog implemented by
> journald itself. Would there be any interest in having native journald support
> as a logging_destination ?
I don't know anything about journald, but I agree that we sorely need
some better way to emit structured log entries.
--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/
"The problem with the facetime model is not just that it's demoralizing, but
that the people pretending to work interrupt the ones actually working."
(Paul Graham)