25 std::vector<spdlog::sink_ptr> sv;
26 base_logger = std::make_shared<spdlog::logger>(
name, sv.begin(), sv.end());
28 base_logger->debug(
"create default logger \"wct\"");
44 auto s = std::make_shared<spdlog::sinks::basic_file_sink_mt>(
filename);
51 auto s = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
55 auto s = std::make_shared<spdlog::sinks::stdout_sink_mt>();
62 auto s = std::make_shared<spdlog::sinks::stderr_color_sink_mt>();
66 auto s = std::make_shared<spdlog::sinks::stderr_sink_mt>();
77 l = std::make_shared<spdlog::logger>(
name, sinks.begin(), sinks.end());
98 logger(which)->set_level(lvl);
106 logger(which)->set_pattern(pattern);
spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT
std::shared_ptr< logger > get(const std::string &name)
void add_stdout(bool color=true, std::string level="")
std::shared_ptr< spdlog::sinks::sink > sinkptr_t
static registry & instance()
void set_level(std::string level, std::string which="")
void set_pattern(std::string pattern, std::string which="")
static Log::logptr_t wct_base_logger()
void set_default_logger(std::shared_ptr< spdlog::logger > default_logger)
void initialize_logger(std::shared_ptr< logger > new_logger)
void add_stderr(bool color=true, std::string level="")
logptr_t logger(std::string name)
std::shared_ptr< spdlog::logger > logptr_t
void set_pattern(std::string pattern, pattern_time_type time_type=pattern_time_type::local)
void add_file(std::string filename, std::string level="")
void register_logger(std::shared_ptr< logger > logger)
void add_sink(sinkptr_t sink, std::string level="")
void set_level(level::level_enum log_level)