emabee / flexi_logger

A flexible logger for rust programs that can write to stderr, stdout, and/or to log files
Apache License 2.0
315 stars 55 forks source link

Allow different log levels for file and stderr logging #131

Closed gibfahn closed 1 year ago

gibfahn commented 1 year ago

Apologies if this exists and I didn't find it.

I'd like to have the user specify the log level to stderr, but to always log at TRACE level to a log file. I couldn't find a way to enable this in the docs.

emabee commented 1 year ago

Sorry for the late reply, somehow I missed this one.

Use a fixed LogSpecification "trace", and let the user decide which Duplicate variant to use in Logger::duplicate_to_stderr.