Function nih_plug::wrapper::setup_logger

source ·
pub fn setup_logger()
Expand description

Set up the logger so that the nih_*!() 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 NIH-log. See the readme there for more information.

In short, NIH-log’s behavior can be controlled by setting the NIH_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.