1 #ifndef GRAIL_LOGGER_MANAGER_H
2 #define GRAIL_LOGGER_MANAGER_H
5 #include <condition_variable>
16 namespace logger_hidden_namespace
18 std::string grail_preprocess_file_path(
const char* _file);
21 #define GRAIL_LOG(name, severity, message) grail::LoggerManager::GetInstance().Log((name), (severity), (message), logger_hidden_namespace::grail_preprocess_file_path(__FILE__), __LINE__)
27 constexpr
const char DEFAULT_GRAIL_LOG_GROUP[] =
"grail";
49 void CreateLogger(
const std::string& loggerName);
50 void AddSinkToLogger(
const std::string& loggerName, std::shared_ptr<Sink> sink);
51 void Log(
const std::string& loggerName,
52 const Severity& severity,
53 const std::string& message,
54 const std::string& file,
61 std::string SeverityMessage(Severity severity)
const;
62 std::map<std::string, std::vector<std::shared_ptr<Sink>>> loggers{};
64 mutable std::mutex loggerMutex{};
67 #endif //GRAIL_LOGGER_MANAGER_H