NVIDIA Holoscan SDK v0.6
Holoscan v0.6

holoscan.logger

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

holoscan.logger.LogLevel Enum class for the logging level.
holoscan.logger.disable_backtrace() Disable backtrace support on the logger.
holoscan.logger.dump_backtrace() Enable backtrace support on the logger.
holoscan.logger.enable_backtrace(arg0) Enable backtrace support on the logger.
holoscan.logger.flush() Force the logger to immediately flush its contents.
holoscan.logger.flush_level() Determine the minimum log level that will trigger an automatic flush.
holoscan.logger.flush_on(arg0) Sets the minimum log level that will trigger an automatic flush.
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.
holoscan.logger.should_backtrace() 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

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.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.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

[1]

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

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.

Previous holoscan.gxf
Next holoscan.operators
© Copyright 2022-2023, NVIDIA. Last updated on Feb 9, 2024.