folly::LoggerDB

LoggerDB stores the set of LogCategory objects.

Synopsis

Declared in <folly/logging/LoggerDB.h>

class LoggerDB;

Type Aliases

NameDescription
InternalWarningHandler Function type for handling internal logging library warnings.

Enums

NameDescription
TestConstructorArg Tag type used to select the testing constructor.

Member Functions

NameDescription
LoggerDB [constructor]Construct a LoggerDB for testing purposes.
~LoggerDB [destructor]Destroy the LoggerDB.
addContextCallback Add a new context string callback to the list.
cleanupHandlers Remove all registered LogHandlers on all LogCategory objects.
flushAllHandlers Call flush() on all LogHandler objects registered on any LogCategory in this LoggerDB.
getCategory Get the LogCategory for the specified name.
getCategoryOrNull Get the LogCategory for the specified name, if it already exists.
getConfig Get a LogConfig object describing the current state of the LoggerDB.
getContextString Return a context string to be appended after default log prefixes.
getFullConfig Get a LogConfig object fully describing the state of the LoggerDB.
registerHandlerFactory Register a LogHandlerFactory.
resetConfig Reset the current LoggerDB state to the specified LogConfig settings.
setLevel Set the log level for the specified category.
unregisterHandlerFactory Remove a registered LogHandlerFactory.
updateConfig Update the current LoggerDB state with the specified LogConfig settings.
xlogInit Initialize the LogCategory* and std::atomic<LogLevel> used by an XLOG() statement.
xlogInitCategory Initialize the LogCategory pointer used by an XLOG() statement.

Static Member Functions

NameDescription
get Get the main LoggerDB singleton.
internalWarning internalWarning() is used to report a problem when something goes wrong internally in the logging library.
setInternalWarningHandler Set a function to be called when the logging library generates an internal warning.

Non-Member Functions

NameDescription
initializeLoggerDBinitializeLoggerDB() will be called to configure the main LoggerDB singleton the first time that LoggerDB::get() is called.