[#XLOG_EVERY_N_THREAD] = XLOG_EVERY_N_THREAD :mrdocs: Similar to XLOG(...) except only log a message every == Synopsis Declared in `<folly/logging/xlog.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- #define XLOG_EVERY_N_THREAD(level, n, ...) ---- == Description The internal counter is thread‐local, avoiding the contention which the XLOG_EVERY_N variations which use a global counter may suffer. If a given XLOG_EVERY_N or variation expansion is encountered concurrently by multiple threads in a hot code path and the global counter in the expansion is observed to be contended, then switching to XLOG_EVERY_N_THREAD can help. Every thread that invokes this expansion has a counter for this expansion. The internal counters are all stored in a single thread‐local map to control TLS overhead, at the cost of a small runtime performance hit. == Parameters [cols="1,4"] |=== | Name| Description | *n* | invocations per thread. | *level* | The `folly::LogLevel` value at which to log. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#