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

Log 0.4 support #6

Closed
wants to merge 5 commits into from
Closed

Log 0.4 support #6

wants to merge 5 commits into from

Conversation

jacekchmiel
Copy link

No description provided.

@dpc
Copy link
Contributor

dpc commented Aug 30, 2018

Anyone interested in owning this crate? :D

@belltoy
Copy link
Contributor

belltoy commented Mar 6, 2019

@dpc I can take this crate if you may

@dpc
Copy link
Contributor

dpc commented Mar 6, 2019

@belltoy Please submit PRs, so I can gain some confidence, and then it's yours.

@rohitjoshi
Copy link

When are we releasing this support? @tanriol mentioned in https://gitter.im/slog-rs/slog that this issue is due to lack of 0.4 support

Issue: slog logs as unknown for record.module() or record.filename() for other crates
e.g 2019-03-09T13:28:08.983|INFO|.43|Stats not enabled
it does print record.line() correctly which is 43 here

This is how I am initializing:

    let log_path = PathBuf::from(log_file);
    let drain = RuntimeFilter::new(drain, level, log_path, log_type, term_log_enabled).fuse();
    let drain = slog_envlogger::new(drain);

    let (drain, async_guard) = slog_async::Async::new(drain)
        .chan_size(2 * 1024 * 1024)
        .overflow_strategy(slog_async::OverflowStrategy::Drop)
        .build_with_guard();
    let drain = drain.fuse();
    let logger = slog::Logger::root(drain, o!());
    (logger, async_guard)

@dpc
Copy link
Contributor

dpc commented Mar 10, 2019

This change as it is right does not look proper (patch.crates-io] etc. is not something we that can be released). Someone has to finish it up.

@rohitjoshi
Copy link

@dpc Another issue was that it reduced performance to half when slog_envlogger is used as let _error_logger = slog_envlogger::init().unwrap();

@dpc
Copy link
Contributor

dpc commented Mar 14, 2019

envlogger's performance is quite bad anyway. :D

This pull request was closed.
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

Successfully merging this pull request may close these issues.

4 participants