Log Manager
- class hal_py.LogManager
The log manager takes care of the log channels of HAL and the sinks (e.g., stdout, log file, GUI) that they write to.
- activate_all_channels(self: hal_py.LogManager) None
Activate all logging channels.
- activate_channel(self: hal_py.LogManager, channel_name: str) None
Activate a channel. By default all channels are active.
- Parameters
channel_name (str) – The name of the channel.
- deactivate_all_channels(self: hal_py.LogManager) None
Deactivate all logging channels.
- deactivate_channel(self: hal_py.LogManager, channel_name: str) None
Deactivate a channel suppressing all output.
- Parameters
channel_name (str) – The name of the channel.
- get_available_log_levels(self: hal_py.LogManager) Set[str]
Get all available severity levels.
- static get_channel(channel_name: str) None
Ensure that a channel with the given name exists, creating it if it does not exist yet. Note that, unlike its C++ counterpart, this does not return the channel itself.
- Parameters
channel_name (str) – Name of the channel.
- get_channels(self: hal_py.LogManager) Set[str]
Returns all channels’ names.
- get_default_sinks(self: hal_py.LogManager) List[hal::LogManager::log_sink]
Get the list of default sinks that are added to each newly created logger by default.
- Returns
The default sinks.
- Return type
list[hal_py.log_sink]
- remove_sink_from_default(self: hal_py.LogManager, sink_type: str) None
Remove the specified sink type from the list of default sinks if present.
- Parameters
sink_type (str) – The type of sink to remove from default sinks.
- set_file_name(self: hal_py.LogManager, file_name: os.PathLike = '') None
Set the log file name. If file_name is empty, the default log file will be used.
- Parameters
file_name (str) – The desired log file.