29#include <source_location>
61 const std::filesystem::path&
getPath()
const;
68 void log(
LogLevel level,
const std::string& message,
const std::source_location& source = std::source_location::current())
const;
71 mutable std::mutex m_mutex;
73 std::filesystem::path m_path;
74 std::shared_ptr<std::ostream> m_stream;
A logger of application messages.
Definition logger.h:39
Logger(const std::filesystem::path &path, LogLevel minimum=LogLevel::Debug, bool append=true)
Constructs a Logger.
const std::filesystem::path & getPath() const
Gets the path for the logs file.
Logger(LogLevel minimum=LogLevel::Debug)
Constructs a Logger.
void log(LogLevel level, const std::string &message, const std::source_location &source=std::source_location::current()) const
Logs a message.
LogLevel
Levels of log messages.
Definition loglevel.h:32