I don't think that's up to the software to provide that. That should
happen in the logging daemon imo.
You can use syslog-ng for example and convert the output to json like
this:
destination d_json {
file("/var/log/messages.json" template("$(format-json --scope
selected_macros --scope nv_pairs)\n"));
};
log {
source(s_src); destination(d_json);
};
(see
https://dustinoprea.com/2014/09/16/convert-syslog-events-to-a-json-stream/)
It is also possible to stream the logs from journal as json btw. =>
journalctl -u postfix -o json
André
------ Originalnachricht ------
Von: "Andrew C Aitchison via mailop" <[email protected]>
An: [email protected]
Gesendet: 20.11.2020 09:01:36
Betreff: [mailop] JSON mail server logs ?
The has been a request for Exim to have the ability to save the
server mainlog in json format 'to make it easier to "consume" it'
https://bugs.exim.org/show_bug.cgi?id=2610
The developers would like to use a "standard" schema;
does anyone use or know of a JSON schema for mail servers logs ?
Thanks,
-- Andrew C. Aitchison Kendal, UK
[email protected]
_______________________________________________
mailop mailing list
[email protected]
https://list.mailop.org/listinfo/mailop
_______________________________________________
mailop mailing list
[email protected]
https://list.mailop.org/listinfo/mailop