ark::debuglog::DebugLogger

Defined in header “ark/debuglog/debug_logger.hh”.


A specific instance of a debug logger. This allows you to write messages, at various debug levels (and/or severity levels), and this logger will format the contents appropriately and redirect to an output.

The debug logger initializes with a verbosity level of zero. Anything that is more verbose will not be processed.

Methods

  • DebugLogger()
    Constructs a new debug logger.

  • void add_log_output(AbstractLogOutputPtr output)
    Adds a new log output to the existing log outputs.

  • void set_log_output(AbstractLogOutputPtr output)
    Sets the new log output for this logger. Removes all existing log outputs and installs just this output.

  • void set_verbosity_threshold(uint32_t verbosity_threshold)
    Sets the new verbosity threshold. Zero is the least verbose, with increasing numbers having additional debugging information or errors/warnings.

  • uint32_t get_verbosity_threshold()
    Returns the currently set verbosity threshold.

  • void log(SeverityLevel severity, uint32_t verbosity, std::experimental::source_location location, const char * text)
    Takes the given text and emits it to the internal loggers for further processing and output. This function is a minor optimization for strings that do not need formatting.

    The verbosity level indicates when something should be printed (how verbose). Zero is always printed, increasing levels of verbosity require special flags to print.

  • void log(SeverityLevel severity, uint32_t verbosity, std::experimental::source_location location, fmt::format_string< Args… > text, Args &&… args)
    Takes the given text, formats with fmt, and emits it to the internal loggers for further processing and output.

    The verbosity level indicates when something should be printed (how verbose). Zero is always printed, increasing levels of verbosity require special flags to print.

  • void log(const DebugLogStatement & statement)
    Logs a pre-formatted ‘debug log statement’. This is useful for when you are bridging different debug loggers.