XLOG_IS_ON_IMPL_HELPER

Helper macro to implement of XLOG_IS_ON()

Synopsis

Declared in <folly/logging/xlog.h>

#define XLOG_IS_ON_IMPL_HELPER(level)

Description

This macro is used in the XLOG() implementation, and therefore must be as cheap as possible. It stores the category's LogLevel as a local static variable. The very first time this macro is evaluated it will look up the correct LogCategory and initialize the LogLevel. Subsequent calls then are only a single conditional log level check.

The LogCategory object keeps track of this local LogLevel variable and automatically keeps it up-to-date when the category's effective level is changed.

See XlogLevelInfo for the implementation details.

Parameters

NameDescription
levelA fully qualified folly::LogLevel value.