FB_LOGF

Log a message to the specified logger, using a fmt::format() string.

Synopsis

Declared in <folly/logging/Logger.h>

#define FB_LOGF(logger, level, fmt, arg1, ...)

Description

The arguments will be processed using fmt::format(). The format syntax is similar to Python format strings.

This macro avoids evaluating the log arguments unless the log level check succeeds.

Beware that the logger argument is evaluated twice, so this argument should be an expression with no side-effects.

Parameters

NameDescription
loggerThe logger identifying the log category.
levelThe unqualified folly::LogLevel name.
fmtThe fmt::format format string.
arg1The first format argument.