11 auto log_manager = py::class_<LogManager, RawPtrWrapper<LogManager>>(m,
"LogManager");
13 log_manager.def(py::init([]() {
19 Set the log file name.
20 If file_name is empty, the default log file will be used.
22 :param str file_name: The desired log file.
26 Set a channel's severity level.
28 :param str channel_name: Name of the channel.
29 :param str level: The severity level, one out of {}.
32 log_manager.def_static(
34 Main purpose of get_channel() method in PYTHON is to create channel if not existing.
36 :param str channel_name: Name of the channel.
40 Returns all channels' names.
42 :returns: Set of channel names.
47 Get all available severity levels.
49 :returns: Set of severity levels.
55 By default all channels are active.
57 :param str channel_name: The name of the channel.
61 Activate all logging channels.
65 Deactivate a channel suppressing all output.
67 :param str channel_name: The name of the channel.
71 Deactivate all logging channels.
75 Get the list of default sinks that are added to each newly created logger by default.
77 :returns: list of default sinks.
78 :rtype: list[hal_py.log_sink]
82 Removes all sinks of the specified type from the default sinks that get a added to each newly created channel by default.
84 :param str sink_type: The type of sink to remove.
87 auto log_sink = py::class_<LogManager::log_sink, RawPtrWrapper<LogManager::log_sink>>(log_manager,
"log_sink");
96 Boolean indication whether sink is a file sink.
102 Truncate option passed to sink.
108 The file path incase the sink is a file sink.
void set_level_of_channel(const std::string &channel_name, const std::string &level)
void activate_channel(const std::string &channel_name)
void deactivate_all_channels()
void deactivate_channel(const std::string &channel_name)
void activate_all_channels()
std::vector< std::shared_ptr< hal::LogManager::log_sink > > get_default_sinks()
std::set< std::string > get_channels() const
std::shared_ptr< spdlog::logger > get_channel(const std::string &channel_name="stdout")
void remove_sink_from_default(const std::string &sink_type)
static LogManager * get_instance(const std::filesystem::path &file_name="")
std::set< std::string > get_available_log_levels() const
void set_file_name(const std::filesystem::path &file_name)
std::unique_ptr< T, py::nodelete > RawPtrWrapper
void log_init(py::module &m)
const Module * module(const Gate *g, const NodeBoxes &boxes)
std::filesystem::path path