Open imbolc opened 3 years ago
Would this approach work for journald integration?
It could be done with a trait object, but I'm afraid std::io::Write
wont be enough, as it consumes just bytes. Journald stores structured data so it would need log level and all the logged variables if kv_unstable
feature is enabled.
I see. Well I'm afraid I'm only doing light maintenance here and can't really provide more than a few cross links.
CC @KodrAus
I found it's easy to make it with tracing, in case someone else will need this: https://gist.github.com/imbolc/f75f924f66c129f0e1e910f59fb75c0d
I wrote a wrapper to use the filter part of env_logger with any Log
implementation (https://gist.github.com/lunaryorn/a2f63c6daa11fabec764caeb8a65dd00) which I use together with a separate journal logging crate
Are there any updates for this one yet?
My question is similar to #178, but about systemd journal as an additional target. Systemd crate already exposes log_record() as a part of its public api. What do you think about adding it as a dependency behind a feature-flag?