Different formats for differen logging targets?
manfredlotz opened this issue · 1 comments
manfredlotz commented
Let's say I log to
.chain(std::io::stderr())
.chain(fern::log_file("output.log")?)
How could I define different formats for looging to stderr
and file output.log
?
manfredlotz commented
Oops sorry for the noise. I guess I found it as I can do the following
fern::Dispatch::new()
.format(|out, message, record| {
...
})
.chain(
fern::Dispatch::new()
...
.format(|out, message, record| {
})
)
.chain(
fern::Dispatch::new()
...
.format(|out, message, record| {
})
)
.apply()?;