#pragma once #include #include namespace bsc::logging { enum class Level { Debug = 0, Info = 1, Warning = 2, Error = 3 }; class Logger { public: static Logger& instance(); void set_level(Level level); void set_utc(bool enabled); void set_microseconds(bool enabled); void set_log_file(const std::string& path); void debug(const std::string& msg); void info(const std::string& msg); void warning(const std::string& msg); void error(const std::string& msg); private: void log(Level level, const std::string& msg); std::string timestamp() const; std::string level_name(Level level) const; Level level_{Level::Info}; bool utc_{true}; bool micro_{false}; std::string file_path_; mutable std::mutex mutex_; }; } // namespace bsc::logging