holoscan::set_log_pattern

Beta
View as Markdown
void holoscan::set_log_pattern(
std::string pattern = ""
)

Set global log format string.

If the environment variable HOLOSCAN_LOG_FORMAT is set, the log pattern will be overridden by the value of the environment variable.

If the user has not set the log pattern explicitly before Application::Application() is called and no environment variable (HOLOSCAN_LOG_FORMAT) is set, the default log pattern will be used.

HOLOSCAN_LOG_FORMAT can be set to one of the following values:

  • SHORT: prints message severity level, and message
  • DEFAULT: prints message severity level, filename:linenumber, and message
  • LONG: prints timestamp, application, message severity level, filename:linenumber, and message
  • FULL: prints timestamp, thread id, application, message severity level, filename:linenumber, and message

Or, a custom format string can be specified. Please refer to the spdlog documentation for the format string syntax.

Parameters

pattern
std::stringDefaults to ""

The format string.