17 explicit spdlogdog(std::shared_ptr<spdlog::logger> l) : m_spdlog(l) {}
19 template <
class... Args>
21 info(
const std::string &fmt, Args... args)
23 m_spdlog->info(fmt, args...);
26 template <
class... Args>
28 warn(
const std::string &fmt, Args... args)
30 m_spdlog->warn(fmt, args...);
33 template <
class... Args>
35 error(
const std::string &fmt, Args... args)
37 m_spdlog->error(fmt, args...);
40 template <
class... Args>
42 debug(
const std::string &fmt, Args... args)
44 m_spdlog->debug(fmt, args...);
47 template <
class... Args>
49 fatal(
const std::string &fmt, Args... args)
51 m_spdlog->error(fmt, args...);
55 std::shared_ptr<spdlog::logger> m_spdlog;
62 configure(
const char *path,
const char *level,
const char *format,
const char *type);
65 get_name()
const {
return m_name; }
71 get_logger(
const tom::String &name) {
return get_logger(name.value().c_str()); }
74 get_logger(
const char *name);
82 debug(
const tom::String &message) { debug(message.value().c_str()); }
84 debug(
const char *message);
86 template <
class... Args>
88 debug(
const std::string &fmt, Args... args)
90 m_log->debug(fmt, args...);
96 info(
const tom::String &message) { info(message.value().c_str()); }
98 info(
const char *message);
100 template <
class... Args>
102 info(
const std::string &fmt, Args... args)
104 m_log->info(fmt, args...);
110 warn(
const tom::String &message) { warn(message.value().c_str()); }
112 warn(
const char *message);
114 template <
class... Args>
116 warn(
const std::string &fmt, Args... args)
118 m_log->warn(fmt, args...);
124 error(
const tom::String &message) { error(message.value().c_str()); }
126 error(
const char *message);
128 template <
class... Args>
130 error(
const std::string &fmt, Args... args)
132 m_log->error(fmt, args...);
138 fatal(
const tom::String &message) { fatal(message.value().c_str()); }
140 fatal(
const char *message);
142 template <
class... Args>
144 fatal(
const std::string &fmt, Args... args)
146 m_log->error(fmt, args...);
150 explicit logger(
const std::string &name);
152 static std::string DEFAULT_LOG;
153 typedef std::unordered_map<std::string, std::shared_ptr<logger>> logger_map_t;
156 std::shared_ptr<spdlogdog> m_log;
159 static logger_map_t s_logs;