Central logger that formats entries and writes them to the console, a file and callbacks.
Synopsis
Declared in <logging.h>
class Logger;
Member Functions
Name |
Description |
Set the override log level for a single category. |
|
Get the per‐category log levels. |
|
Whether the debug log file should be shrunk on startup by default. |
|
Delete a connection |
|
|
|
Disable logging This offers a slight speedup and slightly smaller memory usage compared to leaving the logging system in its default state. Mostly intended for libbitcoin‐kernel apps that don't want any logging. Should be used instead of StartLogging(). |
|
Only for testing |
|
|
|
Returns whether logs will be written to any output |
|
Get the bitmask of enabled log categories. |
|
Returns a vector of the log categories in alphabetical order. |
|
Returns a string with the log categories in alphabetical order. |
|
Get the current global log level. |
|
Returns a string with all user‐selectable log levels. |
|
Send an entry to the log output |
|
Count the callbacks currently connected to the print signal. |
|
Connect a slot to the print signal and return the connection |
|
|
|
|
|
Install the rate limiter used to throttle noisy log locations. |
|
Shrink the debug log file to a reasonable size on startup. |
|
Start logging (and flush all buffered messages) |
|
Check whether a category is enabled at all. |
|
Check whether a category would be logged at a given level. |
Static Member Functions
Name |
Description |
Return log flag if str parses as a log category. |
|
Returns the string representation of a log level. |
Data Members
Name |
Description |
Whether to always print the category and level. |
|
Path of the debug log file. |
|
Whether to include the source location. |
|
Whether to include the originating thread name. |
|
Whether timestamps include microsecond precision. |
|
Whether to prefix entries with a timestamp. |
|
Whether log entries are written to the console. |
|
Whether log entries are written to the debug log file. |
|
Request to reopen the log file, e.g. after log rotation. |
Non-Member Functions
Name |
Description |
Access the global logger instance. |
Created with MrDocs