You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README.md file lists the following motivation for this library:
provide an interface for structured logging - but only if there is a real demand for it (to be seen based on feedback)
I think this would be very valuable. Machines with systemd can use native journal API calls to add structured data to the system journal. Some packages are adding support for this, but it has to be a compile-time option for the package to remain portable to non-systemd (or even non-Linux) machines. I see a need for a universal system call for "log this with structured data" that can work with the journal or syslog daemons.
The hard question is: how should the structured message be formatted? For journal output, it's easy. Just call the native API and let journald figure it out. When writing to /dev/log, we have to use an easy-to-parse structure. We can use RFC-5424, raw JSON, @Cee JSON (umberlog?), or some new format. Do we really want a JSON serializer in liblogging? Or require packages to pull in an external JSON serializer? Anyway, I'm not a big fan of taking a tree of key-value pairs, serializing them to a JSON string, having the syslog daemon deserialize it back into variables (possibly modifying or adding fields), and then syslog serializes it for output (to a file or over the network).
journald still uses a UNIX socket, right? Maybe we could borrow it's over-the-socket format? I wonder if that's a public/stable protocol?
The text was updated successfully, but these errors were encountered:
The README.md file lists the following motivation for this library:
I think this would be very valuable. Machines with systemd can use native journal API calls to add structured data to the system journal. Some packages are adding support for this, but it has to be a compile-time option for the package to remain portable to non-systemd (or even non-Linux) machines. I see a need for a universal system call for "log this with structured data" that can work with the journal or syslog daemons.
The hard question is: how should the structured message be formatted? For journal output, it's easy. Just call the native API and let journald figure it out. When writing to /dev/log, we have to use an easy-to-parse structure. We can use RFC-5424, raw JSON, @Cee JSON (umberlog?), or some new format. Do we really want a JSON serializer in liblogging? Or require packages to pull in an external JSON serializer? Anyway, I'm not a big fan of taking a tree of key-value pairs, serializing them to a JSON string, having the syslog daemon deserialize it back into variables (possibly modifying or adding fields), and then syslog serializes it for output (to a file or over the network).
journald still uses a UNIX socket, right? Maybe we could borrow it's over-the-socket format? I wonder if that's a public/stable protocol?
The text was updated successfully, but these errors were encountered: