[systemd-devel] journal use case -- advice requested
David Strauss
david at davidstrauss.net
Thu Jan 31 22:51:07 PST 2013
We're using a wrapper for sd_journal_print() that adds a few extra
items before the message: the thread ID and the build ID. This is okay
for now, but I'd really like to get advice on how to inject those as
proper fields without adding them manually to every logging call. I'd
also like to maintain our global log-level support that quickly
ignores any entries too verbose for the current configuration.
I've tried a few approaches short of really arcane macros, but it
looks like the right stuff just isn't exposed to users of the journal
library. Rolling out own variadic logging function seems to require
fill_iovec_sprintf(), but that's private.
Any suggestions? Or should I explore patching the journal API to make
it more modular?
--
David Strauss
| david at davidstrauss.net
| +1 512 577 5827 [mobile]
More information about the systemd-devel
mailing list