BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
5 #include <unordered_map>
25 static bool reg_console_appender = appender::register_appender<console_appender>(
"console" );
26 static bool reg_file_appender = appender::register_appender<file_appender>(
"file" );
30 for(
size_t i = 0; i < cfg.
appenders.size(); ++i ) {
34 for(
size_t i = 0; i < cfg.
loggers.size(); ++i ) {
38 if( cfg.
loggers[i].parent.valid() ) {
41 lgr.set_name(cfg.
loggers[i].name);
42 if( cfg.
loggers[i].level.valid() ) lgr.set_log_level( *cfg.
loggers[i].level );
45 for(
auto a = cfg.
loggers[i].appenders.begin(); a != cfg.
loggers[i].appenders.end(); ++a ){
47 if( ap ) { lgr.add_appender(ap); }
50 return reg_console_appender || reg_file_appender;
70 (
"stream",
"std_error")
static appender::ptr create(const std::string &name, const std::string &type, const variant &args)
void configure_logging(const fc::path &log_config)
std::unordered_map< std::string, appender::ptr > & get_appender_map()
Used to generate a useful error report when an exception is thrown.
An order-perserving dictionary of variant's.
logger_config & add_appender(const string &s)
static appender::ptr get(const std::string &name)
fc::optional< log_level > level
if not set, then parents level is used.
wraps boost::filesystem::path to provide platform independent path manipulation.
std::vector< variant > variants
std::unordered_map< std::string, logger > & get_logger_map()
static logging_config default_config()
std::string to_detail_string(log_level ll=log_level::all) const
std::vector< appender_config > appenders
std::vector< string > appenders
static logger get(const std::string &name="default")
Defines exception's used by fc.
std::vector< logger_config > loggers