Debugging utilities¶
-
black_debug(Format, ...)¶
Prints a debug message that includes the current source filename and line. The message is only printed if debug messages are enabled, i.e., if
are_debug_msgs_enabled()
returns true. Debug messages can be enabled withenable_debug_msgs()
and disabled withdisable_debug_msgs()
.- Parameters:
Format – a format string for the message, in {fmt} syntax
... – the arguments of the format string
-
void enable_debug_msgs(std::string const &tag)¶
Enables the reporting of messages through the
black_debug
macro.- Parameters:
tag – a string shown to help the user identify the source of the messages (usually, argv[0]).
-
void disable_debug_msgs()¶
Disables the reporting of messages through the
black_debug
macro.
-
bool are_debug_msgs_enabled()¶
- Returns:
whether debug messages reporting is enabled or not.