folly::XlogCategoryInfo

Per-XLOG()-statement storage for the resolved log category.

Synopsis

Declared in <folly/logging/xlog.h>

template<bool IsInHeaderFile>
class XlogCategoryInfo;

Member Functions

NameDescription
getCategory Returns the resolved log category.
getInfo Get a pointer to pass into the LogStreamProcessor constructor, so that it is able to look up the LogCategory information.
init Resolves and stores the log category for this statement.
isInitialized Tests whether the category has been initialized.

Specializations

NameDescription
XlogCategoryInfo<false> Specialization of XlogCategoryInfo for XLOG() statements in the .cpp file being compiled. In this case we only define a single file-static LogLevel object for the entire file, rather than defining one for each XLOG() statement.