Skip to main content

setup_logger

Function setup_logger 

Source
pub fn setup_logger()
Expand description

Set up the logger so that the nice_*!() logging and assertion macros log output to a centralized location and panics also get written there. By default this logs to STDERR. If a Windows debugger is attached, then messages will be sent there instead. This uses nice-log. See the readme there for more information.

In short, nice-log’s behavior can be controlled by setting the NICE_LOG environment variable to:

  • stderr, in which case the log output always gets written to STDERR.
  • windbg (only on Windows), in which case the output always gets logged using OutputDebugString().
  • A file path, in which case the output gets appended to the end of that file which will be created if necessary.