holoscan.logger

This module provides a Python interface to the Holoscan SDK logger.

holoscan.logger.LogLevel Enum class for the logging level.
holoscan.logger.log_level() Get the global logging level.
holoscan.logger.set_log_level(arg0) Set the global logging level.
holoscan.logger.set_log_pattern(arg0) Set the format pattern for 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

name

value
CRITICAL = <LogLevel.CRITICAL: 5>

DEBUG = <LogLevel.DEBUG: 1>

ERROR = <LogLevel.ERROR: 4>

INFO = <LogLevel.INFO: 2>

OFF = <LogLevel.OFF: 6>

TRACE = <LogLevel.TRACE: 0>

WARN = <LogLevel.WARN: 3>

__init__(self: holoscan.logger._logger.LogLevel, value: int) → None

property name

property value

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
level

The logging level to set

holoscan.logger.set_log_pattern(arg0: str) → None

Set the format pattern for the logger.

Parameters
pattern

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

[1]

https://spdlog.docsforge.com/v1.x/3.custom-formatting/

Previous holoscan.gxf
Next holoscan.operators
© Copyright 2022-2024, NVIDIA. Last updated on Apr 23, 2024.