Closed svanharmelen closed 1 year ago
I'm guessing the env_logger
crate is not logging the values. You should file an issue here: https://github.com/rust-cli/env_logger.
If that is the case @Thomasdezeeuw, do you know which of the other loggers mentioned in the README does support structured logging?
I was under the impression that this was fully handled in this crate and no additional changed were needed by individual loggers.
If that is the case @Thomasdezeeuw, do you know which of the other loggers mentioned in the README does support structured logging?
I have my own implementation: https://github.com/Thomasdezeeuw/std-logger. It supports logfmt and JSON (specifically the JSON format used by GCP).
I was under the impression that this was fully handled in this crate and no additional changed were needed by individual loggers.
Key-value logging is experimental, though I think we're pretty close to a stable release. That said, I think individual implementations still need to separately log the key-value pairs as they're exposed a separate field.
Thanks for the pointer @Thomasdezeeuw. Found this one which confirms your guess 😏 So I'll close this issue again...
Hi 👋🏻 I'm trying write structured logs, but somehow the key/values seem to be ignored...
I have this in my
Cargo.toml
:And this is
main.rs
:And when I run this I get this:
Any ideas? Am I missing anything or doing something wrong?
Thanks!