envoyproxy / envoyproxy/envoy

Fine-grain-logging and component-log-level are incompatible

Open
#35,073 2 comments 0 reactions 0 assignees View on GitHub
area/envoy_log enhancement no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

Command line flag `--enable-fine-grain-logging` lets us use per-file loglevel configuration, but makes per-component loglevel configuration not work any more. One result of this is that users are surprised when adding

```
--log-level info --component-log-level http:debug
```
does not provoke the logging of headers that one might expect.

Further, there is no command line mechanism for starting up with specific loglevels enable for the fine-grain logger.

I'm proposing two things:

1. if the command line includes both `--enable-fine-grain-logging` and `--component-log-level`, this should be an error rather than a surprise later that you didn't get the behavior you asked for.
2. A new command line option `--fine-grain-log-level-paths` that accepts the `paths=` format as specified in the [fine grain logs docs](https://github.com/envoyproxy/envoy/blob/eda7d32bd54d95008b82f2cc7327d63dbd887df0/source/docs/fine_grain_log.md#enable-fine-grain-logger-using-command-line-option), e.g. `--fine-grain-log-level-paths=source/common/http/conn_manager_impl.cc:debug`.

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.