3 #ifndef GRAIL_LOGGER_MANAGER_H
4 #define GRAIL_LOGGER_MANAGER_H
7 #include <condition_variable>
19 namespace logger_hidden_namespace
21 std::string grail_preprocess_file_path(
const char* _file);
24 #define GRAIL_LOG(name, severity, message) grail::logger::LoggerManager::GetInstance().Log((name), (severity), (message), logger_hidden_namespace::grail_preprocess_file_path(__FILE__), __LINE__)
30 constexpr
const char DEFAULT_GRAIL_LOG_GROUP[] =
"grail";
44 void CreateLogger(
const std::string& loggerName);
45 void AddSinkToLogger(
const std::string& loggerName, std::shared_ptr<Sink> sink);
46 void Log(
const std::string& loggerName,
47 const Severity& severity,
48 const std::string& message,
49 const std::string& file,
56 std::map<std::string, std::vector<std::shared_ptr<Sink>>> loggers{};
58 mutable std::mutex loggerMutex{};
62 #endif //GRAIL_LOGGER_MANAGER_H