|
|
lucid
0.0.1
Lifting-based Uncertain Control Invariant Dynamics
|
Collection of logging utilities. More...
Enumerations | |
| enum class | LoggerType |
| Enum used to differentiate between loggers that output to stdout and stderr. | |
Functions | |
| std::shared_ptr< spdlog::logger > | get_logger (LoggerType logger_type) |
| Get a logger of the specified type. | |
| void | set_logger_sink (spdlog::custom_log_callback cb) |
| Replace the standard logger sink with a custom callback. | |
| void | set_logger_sink (std::function< void(std::string)> cb) |
| Replace the standard logger sink with a custom callback. | |
| void | set_pattern (const std::string &format) |
| Set the format of the logger. | |
| void | clear_logger () |
| Clear the logger, removing all loggers and their sinks. | |
| void | set_verbosity_level (spdlog::level::level_enum level) |
| Set the verbosity level of the logger. | |
| void | set_verbosity_level (int level) |
| Set the verbosity level of the logger. | |
Collection of logging utilities.
| void lucid::log::clear_logger | ( | ) |
Clear the logger, removing all loggers and their sinks.
This will remove all loggers created by get_logger and set_logger_sink. After this call, the loggers will need to be recreated using get_logger.
| std::shared_ptr< spdlog::logger > lucid::log::get_logger | ( | LoggerType | logger_type | ) |
Get a logger of the specified type.
If the logger does not exist, it will be created.
| logger_type | stdout or stderr logger |
| void lucid::log::set_logger_sink | ( | spdlog::custom_log_callback | cb | ) |
Replace the standard logger sink with a custom callback.
This action can be undone by calling clear_logger.
cb explicitly does so. | cb | custom callback that will be called with the log message |
| void lucid::log::set_logger_sink | ( | std::function< void(std::string)> | cb | ) |
Replace the standard logger sink with a custom callback.
This action can be undone by calling clear_logger.
cb explicitly does so. | cb | custom callback that will be called with the log message |
| void lucid::log::set_pattern | ( | const std::string & | format | ) |
Set the format of the logger.
This will replace the default format [%Y-%m-%d %H:%M:%S.%e] [%^l%$] [thread %t] %v.
| format | format string to use for the logger |
| void lucid::log::set_verbosity_level | ( | int | level | ) |
Set the verbosity level of the logger.
| level | verbosity level to set |
| void lucid::log::set_verbosity_level | ( | spdlog::level::level_enum | level | ) |
Set the verbosity level of the logger.
| level | verbosity level to set |