envoyproxy / envoyproxy/envoy

Fine grained logging via FANCY_LOG always evaluates macro arguments

Open
#12,885 0 comments 0 reactions 0 assignees View on GitHub
area/envoy_log help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

The ENVOY_LOG macro without fine grained logging doesn't evaluate variadic
arguments when the log level squelches the message. When going through
`FANCY_LOG` however, that no longer holds. Variadic arguments are always evaluated
regardless of the log level involved. This could be problematic from a perf point of view.

Context: https://github.com/envoyproxy/envoy/pull/12830#issuecomment-681918730

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.