|
TARAXA
|
Classes | |
| class | Config |
Typedefs | |
| using | Logger = boost::log::sources::severity_channel_logger_mt<> |
Enumerations | |
| enum | Verbosity { Silent = -1 , Error = 0 , Warning = 1 , Info = 2 , Debug = 3 , Trace = 4 } |
Functions | |
| Logger | createLogger (Verbosity verboseLevel, const std::string &channel, const addr_t &node_id) |
| Creates thread-safe severity channel logger. | |
| Config | createDefaultLoggingConfig () |
| Creates default logging config. | |
| void | InitLogging (Config &logging_config, const addr_t &node_id) |
| Initializes logging according to the provided logging_config. | |
| Verbosity | stringToVerbosity (std::string _verbosity) |
| Transforms string verbosity to Verbosity enum. | |
| using taraxa::logger::Logger = typedef boost::log::sources::severity_channel_logger_mt<> |
| Config taraxa::logger::createDefaultLoggingConfig | ( | ) |
Creates default logging config.
| Logger taraxa::logger::createLogger | ( | Verbosity | verboseLevel, |
| const std::string & | channel, | ||
| const addr_t & | node_id | ||
| ) |
Creates thread-safe severity channel logger.
// Creates logging config auto logging_config = createDefaultLoggingConfig(); logging_config.verbosity = logger::Verbosity::Error; logging_config.channels["SAMPLE_CHANNEL"] = logger::Verbosity::Error;
// Initializes logging according to the provided config InitLogging(logging_config);
addr_t node_addr;
// Creates error logger auto logger = createLogger(logger::Verbosity::Error, "SAMPLE_CHANNEL", node_addr)
LOG(logger) << "sample message";
| verboseLevel | |
| _channel | |
| node_id |
Initializes logging according to the provided logging_config.
| logging_config | |
| node_id |
| Verbosity taraxa::logger::stringToVerbosity | ( | std::string | _verbosity | ) |
Transforms string verbosity to Verbosity enum.
| _verbosity |