#include <logging.h>
|
StdMutex | m_cs |
|
std::atomic_bool | m_started_new_line {true} |
| m_started_new_line is a state variable that will suppress printing of the timestamp when multiple calls are made that don't end in a newline. More...
|
|
std::atomic< uint32_t > | m_categories {0} |
| Log categories bitfield. More...
|
|
Definition at line 74 of file logging.h.
◆ ~Logger()
BCLog::Logger::~Logger |
( |
| ) |
|
◆ DefaultShrinkDebugFile()
bool BCLog::Logger::DefaultShrinkDebugFile |
( |
| ) |
const |
Default for whether ShrinkDebugFile should be run.
Definition at line 363 of file logging.cpp.
◆ DeleteCallback()
void BCLog::Logger::DeleteCallback |
( |
std::list< std::function< void(const std::string &)> >::iterator |
it | ) |
|
|
inline |
Delete a connection.
Definition at line 137 of file logging.h.
◆ DisableCategory() [1/2]
bool BCLog::Logger::DisableCategory |
( |
const std::string & |
str | ) |
|
◆ DisableCategory() [2/2]
void BCLog::Logger::DisableCategory |
( |
LogFlags |
category | ) |
|
◆ DisconnectTestLogger()
void BCLog::Logger::DisconnectTestLogger |
( |
| ) |
|
◆ EnableCategory() [1/2]
bool BCLog::Logger::EnableCategory |
( |
const std::string & |
str | ) |
|
◆ EnableCategory() [2/2]
void BCLog::Logger::EnableCategory |
( |
LogFlags |
category | ) |
|
◆ Enabled()
bool BCLog::Logger::Enabled |
( |
| ) |
const |
|
inline |
Returns whether logs will be written to any output.
Definition at line 122 of file logging.h.
◆ GetCategoryMask()
uint32_t BCLog::Logger::GetCategoryMask |
( |
| ) |
const |
|
inline |
◆ GUARDED_BY() [1/4]
FILE *m_fileout BCLog::Logger::GUARDED_BY |
( |
m_cs |
| ) |
|
|
private |
◆ GUARDED_BY() [2/4]
std::list< std::string > m_msgs_before_open BCLog::Logger::GUARDED_BY |
( |
m_cs |
| ) |
|
|
private |
◆ GUARDED_BY() [3/4]
bool m_buffering BCLog::Logger::GUARDED_BY |
( |
m_cs |
| ) |
|
|
private |
Buffer messages before logging can be started.
◆ GUARDED_BY() [4/4]
std::list< std::function< void(const std::string &)> > m_print_callbacks BCLog::Logger::GUARDED_BY |
( |
m_cs |
| ) |
|
|
inlineprivate |
Slots that connect to the print signal.
Definition at line 100 of file logging.h.
◆ LogCategoriesList()
std::vector< LogCategory > BCLog::Logger::LogCategoriesList |
( |
| ) |
const |
Returns a vector of the log categories in alphabetical order.
Definition at line 156 of file logging.cpp.
◆ LogCategoriesString()
std::string BCLog::Logger::LogCategoriesString |
( |
| ) |
const |
|
inline |
Returns a string with the log categories in alphabetical order.
Definition at line 163 of file logging.h.
◆ LogPrintStr()
void BCLog::Logger::LogPrintStr |
( |
const std::string & |
str, |
|
|
const std::string & |
logging_function, |
|
|
const std::string & |
source_file, |
|
|
const int |
source_line |
|
) |
| |
Send a string to the log output.
Definition at line 233 of file logging.cpp.
◆ LogTimestampStr()
std::string BCLog::Logger::LogTimestampStr |
( |
const std::string & |
str | ) |
|
|
private |
◆ PushBackCallback()
std::list< std::function< void(conststd::string &)> >::iterator BCLog::Logger::PushBackCallback |
( |
std::function< void(const std::string &)> |
fun | ) |
|
|
inline |
Connect a slot to the print signal and return the connection.
Definition at line 130 of file logging.h.
◆ ShrinkDebugFile()
void BCLog::Logger::ShrinkDebugFile |
( |
| ) |
|
◆ StartLogging()
bool BCLog::Logger::StartLogging |
( |
| ) |
|
Start logging (and flush all buffered messages)
Definition at line 44 of file logging.cpp.
◆ WillLogCategory()
bool BCLog::Logger::WillLogCategory |
( |
LogFlags |
category | ) |
const |
Return true if log accepts specified category.
Definition at line 351 of file logging.cpp.
◆ m_categories
std::atomic<uint32_t> BCLog::Logger::m_categories {0} |
|
private |
Log categories bitfield.
Definition at line 94 of file logging.h.
◆ m_cs
◆ m_file_path
◆ m_log_sourcelocations
◆ m_log_threadnames
◆ m_log_time_micros
◆ m_log_timestamps
◆ m_print_to_console
bool BCLog::Logger::m_print_to_console = false |
◆ m_print_to_file
bool BCLog::Logger::m_print_to_file = false |
◆ m_reopen_file
std::atomic<bool> BCLog::Logger::m_reopen_file {false} |
◆ m_started_new_line
std::atomic_bool BCLog::Logger::m_started_new_line {true} |
|
private |
m_started_new_line is a state variable that will suppress printing of the timestamp when multiple calls are made that don't end in a newline.
Definition at line 89 of file logging.h.
The documentation for this class was generated from the following files: