Open
Description
Continuing #1, it would be nice to have SwitchLogger
as described below. Do you want to add a logger like this? If so, what is the name for it?
I'm +1 for TeeLogger
, as I can imagine another logger wrapping multiple loggers that uses the fist matched logger. It can be used as, e.g., SwitchLogger(ProgressLogger(...), TBLogger(...), global_logger())
, to let special loggers handle special log events. To be more precise, the implementation would be something like
function handle_message(logger::SwitchLogger, args...; kwargs...)
i = findfirst(l -> comp_shouldlog(l, args...), logger.logging)
i === nothing && return
return handle_message(logger.logging[i], args...; kwargs...)
end
Originally posted by @tkf in #1 (comment)
Metadata
Metadata
Assignees
Labels
No labels