#include <logging.h>
Definition at line 130 of file logging.h.
◆ CategoryLevels()
| std::unordered_map< LogFlags, Level > BCLog::Logger::CategoryLevels |
( |
| ) |
const |
|
inline |
◆ DefaultShrinkDebugFile()
| bool BCLog::Logger::DefaultShrinkDebugFile |
( |
| ) |
const |
◆ DeleteCallback()
| void BCLog::Logger::DeleteCallback |
( |
std::list< std::function< void(const std::string &)> >::iterator |
it | ) |
|
|
inline |
Delete a connection.
Definition at line 199 of file logging.h.
◆ DisableCategory() [1/2]
◆ DisableCategory() [2/2]
| bool BCLog::Logger::DisableCategory |
( |
std::string_view |
str | ) |
|
◆ DisableLogging()
| void BCLog::Logger::DisableLogging |
( |
| ) |
|
Disable logging This offers a slight speedup and slightly smaller memory usage compared to leaving the logging system in its default state.
Should be used instead of StartLogging().
Definition at line 117 of file logging.cpp.
◆ DisconnectTestLogger()
| void BCLog::Logger::DisconnectTestLogger |
( |
| ) |
|
◆ EnableCategory() [1/2]
◆ EnableCategory() [2/2]
| bool BCLog::Logger::EnableCategory |
( |
std::string_view |
str | ) |
|
◆ Enabled()
| bool BCLog::Logger::Enabled |
( |
| ) |
const |
|
inline |
Returns whether logs will be written to any output.
Definition at line 184 of file logging.h.
◆ Format()
◆ GetCategoryMask()
◆ GetLogCategory()
| std::optional< BCLog::LogFlags > BCLog::Logger::GetLogCategory |
( |
std::string_view |
str | ) |
|
|
static |
Return log flag if str parses as a log category.
Definition at line 228 of file logging.cpp.
◆ GetLogPrefix()
◆ GUARDED_BY() [1/9]
◆ GUARDED_BY() [2/9]
◆ GUARDED_BY() [3/9]
Buffer messages before logging can be started.
◆ GUARDED_BY() [4/9]
◆ GUARDED_BY() [5/9]
◆ GUARDED_BY() [6/9]
◆ GUARDED_BY() [7/9]
Manages the rate limiting of each log location.
◆ GUARDED_BY() [8/9]
Category-specific log level. Overrides m_log_level.
◆ GUARDED_BY() [9/9]
Slots that connect to the print signal.
Definition at line 160 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 288 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 254 of file logging.h.
◆ LogLevel()
| Level BCLog::Logger::LogLevel |
( |
| ) |
const |
|
inline |
◆ LogLevelsString()
| std::string BCLog::Logger::LogLevelsString |
( |
| ) |
const |
Returns a string with all user-selectable log levels.
Definition at line 304 of file logging.cpp.
◆ LogLevelToStr()
| std::string BCLog::Logger::LogLevelToStr |
( |
BCLog::Level |
level | ) |
|
|
static |
Returns the string representation of a log level.
Definition at line 244 of file logging.cpp.
◆ LogPrint()
Send an entry to the log output.
Definition at line 437 of file logging.cpp.
◆ LogPrint_()
Send an entry to the log output (internal)
Definition at line 444 of file logging.cpp.
◆ LogTimestampStr()
| std::string BCLog::Logger::LogTimestampStr |
( |
SystemClock::time_point |
now, |
|
|
std::chrono::seconds |
mocktime |
|
) |
| const |
|
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 191 of file logging.h.
◆ SetCategoryLogLevel() [1/2]
| void BCLog::Logger::SetCategoryLogLevel |
( |
const std::unordered_map< LogFlags, Level > & |
levels | ) |
|
|
inline |
◆ SetCategoryLogLevel() [2/2]
| bool BCLog::Logger::SetCategoryLogLevel |
( |
std::string_view |
category_str, |
|
|
std::string_view |
level_str |
|
) |
| |
◆ SetLogLevel() [1/2]
| void BCLog::Logger::SetLogLevel |
( |
Level |
level | ) |
|
|
inline |
◆ SetLogLevel() [2/2]
| bool BCLog::Logger::SetLogLevel |
( |
std::string_view |
level | ) |
|
◆ SetRateLimiting()
◆ ShrinkDebugFile()
| void BCLog::Logger::ShrinkDebugFile |
( |
| ) |
|
◆ StartLogging()
| bool BCLog::Logger::StartLogging |
( |
| ) |
|
Start logging (and flush all buffered messages)
Definition at line 55 of file logging.cpp.
◆ WillLogCategory()
◆ WillLogCategoryLevel()
◆ m_always_print_category_level
◆ m_categories
Log categories bitfield.
Definition at line 153 of file logging.h.
◆ m_cs
◆ m_file_path
◆ m_log_level
If there is no category-specific log level, all logs with a severity level lower than m_log_level will be ignored.
Definition at line 150 of file logging.h.
◆ 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
◆ m_reopen_file
| std::atomic<bool> BCLog::Logger::m_reopen_file {false} |
The documentation for this class was generated from the following files: