Closed andymac4182 closed 2 years ago
Thanks @andymac4182! That's interesting - a pino stream that writes CLEF to the console would open up some deployment options 🤔
It would also be interesting to look at field mappings in the GELF input, and that solution would probably have a few more uses... Will give it some thought!
This should now be resolved by https://github.com/datalust/sqelf/pull/104
:D woo hoo! I think I remember why I logged this 😛
Hi,
I am looking at setting this up for an application and using gelf as a way to capture all logs from the container and capture the
pino
logs along with them. Usingpino
by default it logged a blank message template with a property ofmsg
and the rest of the properties from the log line as properties of the log message.After copying
PinoSeqStream
into my app and updating it to write to console and use the CLEF property names matching https://github.com/datalust/sqelf/blob/6b9682dda3735294057f654e0ca6ddfafc480db7/sqelf/src/process/clef.rs#L28-L57 I started to get all the right logs and properties.Should we look at a
writable
as part of this library.Unfortunately some messages are written to console by other libraries that I don't have control over in json format that don't get read correctly.
This might be a potentially better fix to offer configuration or a more lax set of options in https://github.com/datalust/sqelf