-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatible with fern 0.5.x #1
Comments
Seems |
Yep- though I didn't actually realize this crate uses the systemd crate rather than syslog. If systemd has additional capabilities that sylsog doesn't, fern could definitely add support for it. There's documentation for using syslog directly in fern at https://docs.rs/fern/0.5/fern/syslog/index.html. |
This crate was a quick and dirty solution for logging directly in the systemd journal, it's not really well polished or regularly maintained. I can try to make this work with Fern 0.5 though when I'll have some free time. But if @daboross thinks Fern should have an official systemd support, then that would be a much better and cleaner solution and it would render this crate obsolete. |
This was pretty much my point of view on things too. I've looked a bit more but all I can tell is that I'm also not 100% sure whether I'd probably want to do more research before implementing a hook for |
Hello! In theory journal fields should cover every syslog field, of course maybe with different names. syslog is defined in an RFC somewhere (RFC 5424 since 2009, before that there was 3164 since 2001), and all of it is a bit useless, because none of it is kernel enforced. (So any program can log as any facility, at least to my knowledge.) Whereas journal tries to get these bits of information (process binary path, etc) from the kernel directly (PID is attached to messages for example if using a unix domain socket), and from procfs (which can of course lead to a bit of a performance bottleneck, that got addressed by throwing a cache there in v235). So the "journal protocol" can be thought of as stable. It'd be great if Rust could log to systemd without the need for libsystemd during compilation (would help with cross compiling, etc), but otherwise there's no point in re-implementing the handling of all the special fields that are part of journald's structured log messages (that is the real feature, not the syslog compatibility). Sorry for the haphazard comment, it's a bit of a chicken and egg problem, as it depends on what currently the systemd crate can do, what fern targets (does it want to support arbitrary key-value metadata for logging? journald supports that, syslog only supports unstructured byte arrays (text basically)). And usually when people want systemd logging (jorunald) integration they either don't know what they want and syslog is (or would be) fine for them, or they want to explicitly use some kind of journald only thing. |
It seems that the
FernLog
type was removed in 0.5.1 in 2017-12-26The text was updated successfully, but these errors were encountered: