Changeset View
Changeset View
Standalone View
Standalone View
src/logging.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | public: | ||||
/** Returns whether logs will be written to any output */ | /** Returns whether logs will be written to any output */ | ||||
bool Enabled() const { | bool Enabled() const { | ||||
std::lock_guard<std::mutex> scoped_lock(m_cs); | std::lock_guard<std::mutex> scoped_lock(m_cs); | ||||
return m_buffering || m_print_to_console || m_print_to_file; | return m_buffering || m_print_to_console || m_print_to_file; | ||||
} | } | ||||
/** Start logging (and flush all buffered messages) */ | /** Start logging (and flush all buffered messages) */ | ||||
bool StartLogging(); | bool StartLogging(); | ||||
/** Only for testing */ | |||||
void DisconnectTestLogger(); | |||||
void ShrinkDebugFile(); | void ShrinkDebugFile(); | ||||
uint32_t GetCategoryMask() const { return m_categories.load(); } | uint32_t GetCategoryMask() const { return m_categories.load(); } | ||||
void EnableCategory(LogFlags category); | void EnableCategory(LogFlags category); | ||||
bool EnableCategory(const std::string &str); | bool EnableCategory(const std::string &str); | ||||
void DisableCategory(LogFlags category); | void DisableCategory(LogFlags category); | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |