pub fn init(level: LevelFilter) -> Result<(), SetLoggerError>Expand description
initialize the logger at a given STDERR verbosity level
level is the console verbosity (--quiet ⇒ Warn, default ⇒ Info,
--verbose/--debug ⇒ Debug). Perl decouples this from the log-file floor:
the .latexml.log keeps a minimum of Info regardless of --quiet, while
STDERR follows level (Common/Error.pm _printline; issue #763). So the
global log max_level is set to the MORE verbose of level and Info (the
floor), admitting to LatexmlLogger::log everything the log needs; the STDERR
echo is then gated separately on the STDERR_LEVEL atomic.
Returns the underlying SetLoggerError if another log global logger
is already installed (e.g. an embedder set up tracing-log first).
Callers can decide whether to ignore that — the in-process bind_log /
flush_log buffers are independent of the log crate sink and keep
working either way.