


Systemd is in many respects a major departure from UNIX philosophy, and I predict it will mark an inflection point in the quality and usability of Linux distros that adopt it, hence my efforts to migrate my own systems to FreeBSD.įor those wondering what I'm banging on about, please read The Art of UNIX Programming, which should have been called The Philosophy of UNIX:Įdit: what I mean by fundamental is that it shouldn't matter whether the tools are intended for desktop or server use they should be designed to interoperate seamlessly using text protocols via pipes, sockets and files. If I only want to log certain data and disregard stderr, or if I can guarantee everything that gets written to stderr will be valid JSON, writing logs as JSON may be better.īut more fundamentally than the desktop / server focus, they either don't understand or don't value what makes UNIX great. Of course, it's a case-by-case, pragmatic decision. If I need to, I can then modify the PEG for that use case. Having a PEG for those cases means I can still get JSON for everything if I need to, even if the data in the log is unexpected.
SQLITESTUDIO ON SURFACE PRO 4 SOFTWARE
stderr is pretty much a catch-all log stream, and some 3rd party software insist on writing to it (most do however offer a way to override this behavior, e.g., chromium-headless, libxml2, &c). Most JSON libraries supports this.Īs for general logging: I prefer it to be structured text written to stderr, and have a PEG parsing it for me. Just parse objects incrementally, one at a time. Or any variations of common whitespace between the objects. However, requiring records to be line-delimited is a point of failure when accepting input from external sources. For certain tasks, I like to work on streams of JSON records too.
