9 #ifndef CPPLOGGING_LOGGER_H
10 #define CPPLOGGING_LOGGER_H
33 explicit Logger(
const std::string& name);
47 void Debug(std::string_view message)
const {
Debug(
"{}", message); }
55 template <
typename... T>
56 void Debug(fmt::format_string<T...> message, T&&... args)
const;
62 void Info(std::string_view message)
const {
Info(
"{}", message); }
68 template <
typename... T>
69 void Info(fmt::format_string<T...> message, T&&... args)
const;
75 void Warn(std::string_view message)
const {
Warn(
"{}", message); }
81 template <
typename... T>
82 void Warn(fmt::format_string<T...> message, T&&... args)
const;
88 void Error(std::string_view message)
const {
Error(
"{}", message); }
94 template <
typename... T>
95 void Error(fmt::format_string<T...> message, T&&... args)
const;
101 void Fatal(std::string_view message)
const {
Fatal(
"{}", message); }
107 template <
typename... T>
108 void Fatal(fmt::format_string<T...> message, T&&... args)
const;
118 std::shared_ptr<Processor> _sink;
125 explicit Logger(
const std::string& name,
const std::shared_ptr<Processor>& sink);
134 template <
typename... T>
135 void Log(
Level level,
bool format, fmt::format_string<T...> message, T&&... args)
const;
Logger configuration static class.
Logger(const Logger &)=default
void Warn(std::string_view message) const
Log warning message.
void Flush()
Flush the current logger.
Logger(Logger &&)=default
Logger()
Initialize default logger.
void Debug(std::string_view message) const
Log debug message.
void Fatal(std::string_view message) const
Log fatal message.
void Error(std::string_view message) const
Log error message.
void Info(std::string_view message) const
Log information message.
void Update()
Update the current logger sink by taking the most recent one from configuration.
Logger & operator=(const Logger &)=default
Logger & operator=(Logger &&)=default
Logger interface inline implementation.
C++ Logging project definitions.
Logging processors definition.