-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Description
When I'm trying to implement fast/logforth#145 I noticed that Record<'a>
has a lifetime argument and thus can be hardly sent to another thread.
In spdlog-rs @SpriteOvO defineds its own Record
and RecordOwned
to support AsyncSink
. spdlog-rs also supports a bridge to this log
crate, but it comes with some data loss (https://github.com/SpriteOvO/spdlog-rs/blob/654b440d/spdlog/src/record.rs#L115-L148), mainly the args
get resolved and we can't revert it to fmt::Arguments<'a>
.
Is there any possible way we get an owned Record? Otherwise it's impossible to implmement:
impl Append for AsyncAppender {
fn append(&self, record: &Record, ...) -> .. { ... }
}
impl Append for RollingFileAppender {
fn append(&self, record: &Record, ...) -> .. { ... }
}
... and combine them together.
Metadata
Metadata
Assignees
Labels
No labels