Closed mitar closed 1 year ago
The recommended way to do that is to set the level on the logger, so the event is skipped early.
The recommended way to do that is to set the level on the logger, so the event is skipped early.
Yes, but this is not possible if you want to log to multiple destinations (e.g., console and file). Then you have to set the level on the logger to the lowest of those you want and then filter at the writer.
Make sense. Can you please add a note on the description of this writer about the use-case it is covering so people don’t think that is the recommended way to deal with levels?
Done!
Fixes #150.
This allows one to combine
FilteredLevelWriter
,LevelWriterAdapter
andMultiLevelWriter
into any way you want. E.g., have info and above being logged to the console while all levels to a file.