Hi there, I wrote my first response not to the list, so sry for the double. > On the other hand, JSON parsing might be a useful addition to journald, as > apparently "@cee: {<jsondict>}" is a quite common syslog format. JSON is meant to be parsed by an application and I am not sure if logging (specially for humans) is the way to go here... > I would suggest implementing support for multiple logging backends – don't > call journald APIs directly and don't print out JSON directly, but have > abstract functions such as log_info(text, **kvpairs) or something such. > That's what many programs already do for file/syslog/journal backends. > (Possibly just use the `logging` module in python?) I would highly suggest to use that module. There is even a ready to go logger[0] for journald available. Best Vincent [0] https://stackoverflow.com/questions/34588421/how-to-log-to-journald-systemd-via-python
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel