On Tue, Feb 27, 2018 at 04:50:24PM +0000, Greg Stark wrote:
> I would actually lean another way. If jsonlog opened *.json and wrote
> there then it could leave the output_to_server field unchanged. It
> does look like this might be a bit awkward with yet more of the static
> functions needing to be duplicated.

Which brings in why the chunked protocol that the syslogger uses is
useful, because by using a custom file you would either need to introduce
a global locking mechanism or to create a background worker that jsonlog
can feed its data to so as the log file does not finish with overlapping
writes. This bgworker which could use its own protocol or use the same
protocol as the syslogger, resulting in a sort of secondary syslogger
process.  If you feel motivated to code anything like that, I'll be
happy to merge it in my tree with jsonlog :)
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to