Skip to content
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

StdLog doesn't pass key => value from inside log messages with env_logger #59

Closed
Emilgardis opened this issue Oct 2, 2016 · 2 comments

Comments

@Emilgardis
Copy link

I'm currently trying to implement stdlog for Amethyst for optional slog support for a binary. To enable this, I'm using the

struct Foo {
    logger: logger.unwrap_or(slog::Logger::root(slog_stdlog::StdLog.fuse(), o!()))
}

method described in crates/example-lib However, when a binary doesn't use a slog drain, but env_logger, messages that should look like this with env_logger (and does with slog)

ERROR:my:library:source: error message here, errorid: 405, cause: foo

looks like

ERROR:my:library:source: error message here

skipping the information that should be delivered with error!(self.logger, "error message here"; "errorid" => error_id, "cause" => cause);

@Emilgardis Emilgardis changed the title StdLog doesn't pass key => value from inside log messages StdLog doesn't pass key => value from inside log messages with env_logger Oct 2, 2016
@dpc dpc closed this as completed in 6040087 Oct 2, 2016
@dpc
Copy link
Collaborator

dpc commented Oct 2, 2016

Thanks for report! I've just missed that. :( . Should be fixed now - please confirm if it works for you as expected. I need to optimize in #60, and if it does, I'll publish new version.

@Emilgardis
Copy link
Author

LGTM! Thank you!

dpc added a commit that referenced this issue Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants