holoscan.logger
This module provides a Python interface to the Holoscan SDK logger.
Enum class for the logging level. |
|
Disable backtrace support on the logger. |
|
Enable backtrace support on the logger. |
|
Enable backtrace support on the logger. |
|
Force the logger to immediately flush its contents. |
|
Determine the minimum log level that will trigger an automatic flush. |
|
|
Sets the minimum log level that will trigger an automatic flush. |
Set the Holoscan SDK logging level via the HOLOSCAN_LOG_LEVEL environment variable. |
|
Get the global logging level. |
|
Set the global logging level. |
|
Set the format pattern for the logger. |
|
Enable backtrace support on the logger. |
- class holoscan.logger.LogLevel
Bases:
pybind11_builtins.pybind11_object
Enum class for the logging level.
Members:
TRACE
DEBUG
INFO
WARN
ERROR
CRITICAL
OFF
Attributes
value
-
CRITICAL =
-
DEBUG =
-
ERROR =
-
INFO =
-
OFF =
-
TRACE =
-
WARN =
- __init__(self: holoscan.logger._logger.LogLevel, value: int) → None
- property name
- property value
-
CRITICAL =
- holoscan.logger.disable_backtrace() → None
Disable backtrace support on the logger.
- holoscan.logger.dump_backtrace() → None
Enable backtrace support on the logger.
When enabled, all debug/trace messages are stored in a circular buffer until needed for debugging.
- Parameters
- n_messagesstr
The number of messages in the circular buffer.
- holoscan.logger.enable_backtrace(arg0: int) → None
Enable backtrace support on the logger.
When enabled, all debug/trace messages are stored in a circular buffer until needed for debugging.
- Parameters
- n_messagesstr
The number of messages in the circular buffer.
- holoscan.logger.flush() → None
Force the logger to immediately flush its contents.
- holoscan.logger.flush_level() → holoscan.logger._logger.LogLevel
Determine the minimum log level that will trigger an automatic flush.
- Returns
- levelholoscan.logger.LogLevel
The level at which the flush occurs.
- holoscan.logger.flush_on(arg0: holoscan.logger._logger.LogLevel) → None
Sets the minimum log level that will trigger an automatic flush.
- Parameters
- levelholoscan.logger.LogLevel
The level at which the logger should automatically flush.
- holoscan.logger.load_env_log_level() → None
Set the Holoscan SDK logging level via the HOLOSCAN_LOG_LEVEL environment variable.
HOLOSCAN_LOG_LEVEL can be set to any of the following levels (in order of decreasing verbosity):
- holoscan.logger.log_level() → holoscan.logger._logger.LogLevel
Get the global logging level.
- holoscan.logger.set_log_level(arg0: holoscan.logger._logger.LogLevel) → None
Set the global logging level.
- Parameters
- levelholoscan.logger.LogLevel
The logging level to set
- holoscan.logger.set_log_pattern(arg0: str) → None
Set the format pattern for the logger.
- Parameters
- patternstr
The pattern to use for logging messages. Uses the spdlog format specified at [1]. The default pattern used by spdlog is “[%Y-%m-%d %H:%M:%S.%e] [%l] [%n] %v”.
References
- holoscan.logger.should_backtrace() → bool
Enable backtrace support on the logger.
When enabled, all debug/trace messages are stored in a circular buffer until needed for debugging.
- Parameters
- n_messagesstr
The number of messages in the circular buffer.