18 #ifndef MAUVE_RUNTIME_LOGGER_HPP 19 #define MAUVE_RUNTIME_LOGGER_HPP 23 #include "spdlog/spdlog.h" 24 #include "spdlog/fmt/bundled/ostream.h" 33 class AbstractComponent;
34 class AbstractResource;
50 static void initialize();
56 static void initialize(std::istream& is);
62 static void initialize(
const std::string& s);
68 static void initialize(
const YAML::Node& n);
89 template <
typename... Args>
90 void trace(
const char* fmt,
const Args&... args);
98 template <
typename... Args>
99 void debug(
const char* fmt,
const Args&... args);
107 template <
typename... Args>
108 void info(
const char* fmt,
const Args&... args);
116 template <
typename... Args>
117 void warn(
const char* fmt,
const Args&... args);
125 template <
typename... Args>
126 void error(
const char* fmt,
const Args&... args);
134 template <
typename... Args>
135 void critical(
const char* fmt,
const Args&... args);
141 static std::map<std::string,
142 std::vector< std::shared_ptr<spdlog::logger> > >
loggers;
152 virtual std::string prepend(
const char* fmt) = 0;
157 virtual std::string name() = 0;
163 static spdlog::level::level_enum level_enum(
const std::string& lvl);
179 std::string prepend(
const char* fmt)
override;
180 std::string name()
override;
196 std::string prepend(
const char* fmt)
override;
197 std::string name()
override;
203 std::string status();
217 std::string prepend(
const char* fmt)
override;
218 std::string name()
override;
224 std::string status();
234 std::string name()
override;
235 std::string prepend(
const char* fmt)
override;
241 #include "ipp/logger.ipp" Class of a MAUVE logger for the deployer.
Definition: logger.hpp:230
Class of a MAUVE logger for a component.
Definition: logger.hpp:188
Class of a MAUVE logger for a custom category.
Definition: logger.hpp:170
static std::map< std::string, std::vector< std::shared_ptr< spdlog::logger > > > loggers
Store spdlog loggers associated to the categories.
Definition: logger.hpp:142
static std::shared_ptr< spdlog::logger > default_logger_
Default logger when no category specified.
Definition: logger.hpp:146
Class of a generic MAUVE logger.
Definition: logger.hpp:39
The MAUVE namespace.
Definition: tracing.hpp:24
Definition: factory.hpp:23
Abstract Resource class.
Definition: AbstractResource.hpp:37
Class of a MAUVE logger for a resrouce.
Definition: logger.hpp:209
Abstract Component class.
Definition: AbstractComponent.hpp:43