Manages all log domains.
More...
#include <log_manager.hpp>
Inherits matador::singleton< log_manager >.
|
class | singleton< log_manager > |
|
Manages all log domains.
The log_manager class is a singleton and manages all available log_domains
There ist always a default log domain with the name "default" available for which sinks can be added and loggers can be created.
◆ add_sink() [1/2]
void matador::log_manager::add_sink |
( |
sink_ptr |
sink | ) |
|
Adds a log sink to the default log_domain
- Parameters
-
◆ add_sink() [2/2]
void matador::log_manager::add_sink |
( |
sink_ptr |
sink, |
|
|
const std::string & |
domain_name |
|
) |
| |
Adds a log sink to the log_domain with the given name. If the log domain doesn't exists, it is automatically created.
- Parameters
-
sink | Sink to add |
domain_name | Name of the log domain |
◆ clear()
void matador::log_manager::clear |
( |
| ) |
|
Remove all log domains but the default log domain. Clears all sinks from the default log domain.
◆ clear_all_sinks() [1/2]
void matador::log_manager::clear_all_sinks |
( |
| ) |
|
Clears all sinks from default log domain
◆ clear_all_sinks() [2/2]
void matador::log_manager::clear_all_sinks |
( |
const std::string & |
domain_name | ) |
|
Clears all sinks from the log domain with the given name
- Parameters
-
domain_name | Domain name to clear all sinks from |
◆ create_logger() [1/2]
logger matador::log_manager::create_logger |
( |
std::string |
source | ) |
|
Creates a logger with the given source name for the default log domain
- Parameters
-
- Returns
- The created logger
◆ create_logger() [2/2]
logger matador::log_manager::create_logger |
( |
std::string |
source, |
|
|
const std::string & |
domain_name |
|
) |
| |
Creates a logger with the given source name for the log domain identified by the given log domain name.
If the log domain with the given name doesn't exists the domain ist created
- Parameters
-
source | Name of the source |
domain_name | The name of the log domain to execute to |
- Returns
- The created logger
◆ max_default_log_level() [1/2]
static log_level matador::log_manager::max_default_log_level |
( |
| ) |
|
|
static |
Returns the default max log level
- Returns
- The max log level
◆ max_default_log_level() [2/2]
static void matador::log_manager::max_default_log_level |
( |
log_level |
max_level | ) |
|
|
static |
Sets the max default log level. Default max leven is LVL_FATAL. All log domains will start with this default max log range
- Parameters
-
◆ min_default_log_level() [1/2]
static log_level matador::log_manager::min_default_log_level |
( |
| ) |
|
|
static |
Returns the default min log level
- Returns
- The min log level
◆ min_default_log_level() [2/2]
static void matador::log_manager::min_default_log_level |
( |
log_level |
min_level | ) |
|
|
static |
Sets the default min log level. Default min leven is LVL_INFO. All log domains will start with this default max log range
- Parameters
-
The documentation for this class was generated from the following file:
- matador/logger/log_manager.hpp