envoyproxy/envoy

Fine grained logging via FANCY_LOG always evaluates macro arguments

Open

#12,885 创建于 2020年8月29日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)C++ (5,373 fork)batch import
area/envoy_loghelp wanted

仓库指标

Star
 (27,997 star)
PR 合并指标
 (平均合并 8天) (30 天内合并 378 个 PR)

描述

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

贡献者指南