Expand description
Macros for logging and debug assertions. nice_dbg!(), nice_trace!(), and the
nice_debug_assert_*!() macros are compiled out during release builds, so they can be used for
asserting adiditonal invariants in debug builds. Check the nice_log!() macro for more
information on nice-plug’s logger. None of the logging functions are realtime-safe, and you
should avoid using them during release builds in any of the functions that may be called from an
audio thread.
Macros§
- nice_
dbg - Analogues to the
dbg!()macro, but respecting theNICE_LOGenvironment variable and with all of the same logging features as the othernice_*!()macros. Like thenice_debug_assert*!()macros, this is only shown when compiling in debug mode, but the macro will still return the value in non-debug modes. - nice_
debug_ assert - A
debug_assert!()analogue that prints the error with line number information instead of panicking. During tests this is upgraded to a regular panickingdebug_assert!(). - nice_
debug_ assert_ eq - A
debug_assert_eq!()analogue that prints the error with line number information instead of panicking. Seenice_debug_assert!()for more information. - nice_
debug_ assert_ failure - An unconditional debug assertion failure, for if the condition has already been checked
elsewhere. See
nice_debug_assert!()for more information. - nice_
debug_ assert_ ne - A
debug_assert_ne!()analogue that prints the error with line number information instead of panicking. Seenice_debug_assert!()for more information. - nice_
error - Similar to
nice_log!(), but more scream-y. Used for printing fatal errors. - nice_
log - Write something to the logger. This defaults to STDERR unless the user is running Windows and a
debugger has been attached, in which case
OutputDebugString()will be used instead. - nice_
trace - The same as
nice_log!(), but with source and thread information. Like thenice_debug_assert*!()macros, this is only shown when compiling in debug mode. - nice_
warn - Similar to
nice_log!(), but less subtle. Used for printing warnings.