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 #5

Closed
wants to merge 3 commits into from
Closed

Log 0.4 support #5

wants to merge 3 commits into from

Conversation

jacekchmiel
Copy link

No description provided.

Jacek Chmiel added 2 commits June 17, 2018 12:24
Log dependency introduces several naming changes in API. Besides that
the most significant change for us is lifetime change for record location
strings from 'static to 'a. This requires more changes in slog and then in
slog-async.

log -> slog message transition is implemented and working (alongisde with
slog and slog-async changes).

slog -> log message transition is not implemented yet properly (it is
compiling though).
@breezewish
Copy link

Are there plans to merge?

@dpc
Copy link
Contributor

dpc commented Aug 28, 2018

Anyone willing to take ownership and maintain this crate?

@siddontang
Copy link
Contributor

Hi @dpc

Now we are heavily using slog and stdlog in TiKV, so if you don't mind, we can take the ownership of this crate.

you can add @breeswish and @Hoverbear to the owner.

@siddontang
Copy link
Contributor

now using stdlog with slog will output "Unknow" for the file, and we want to fix it. :-)

@dpc
Copy link
Contributor

dpc commented Aug 29, 2018

@siddontang Thank you. I've added you as an Admin. Feel free to organize it according to your own needs.

@dpc
Copy link
Contributor

dpc commented Aug 29, 2018

@siddontang On crates.io:

       Owner user siddontang has been invited to be an owner of crate slog-stdlog

@siddontang
Copy link
Contributor

Thanks @dpc

We will improve stdlog ASAP.

@pravic
Copy link

pravic commented Oct 15, 2018

Hi, any news on this?

@mbilker
Copy link

mbilker commented Mar 28, 2019

Well, this is a bit of a hard one. If the main slog crate migrates to using borrowed values for file and module in RecordLocation, then it would be possible to use the information from log::Record. Otherwise, the only value that can be used is some placeholder value like <unknown>.

Also, it is possible to use format_args! with LazyLogString, but you cannot store the log::Record into a variable. The record must be immediately passed into log::logger().log.

let lazy = LazyLogString::new(info, logger_values);
log::logger().log(&log::Record::builder()
    .args(format_args!("{}", lazy))
    .level(level)
    .target(target)
    .file(Some(info.file()))
    .line(Some(info.line()))
    .module_path(Some(info.module()))
    .build());

@Hoverbear
Copy link

@mbilker Can you open an issue about this there?

@mbilker
Copy link

mbilker commented Mar 30, 2019

@Hoverbear Comment on the main slog repository about using borrowed values that are not 'static?

It would probably be easier to use Cow<'static, str>.

@spease
Copy link

spease commented Jul 11, 2019

Is this crate still being maintained? The lack of log 0.4 is a consistent papercut for using cargo upgrade with a team project. I was coming on here to see if it was a simple fix.

@dpc
Copy link
Contributor

dpc commented Jul 11, 2019

@spease I'm alive and well, but can't actively dedicate the time to solve it. Someone actually bothered by this will have to step in and address the problem.

@dpc
Copy link
Contributor

dpc commented Dec 20, 2019

I think #9 made this obsolete.

@dpc dpc closed this Dec 20, 2019
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.

8 participants