Let's encrypt related logging messages should be INFO level instead of DEBUG

When using log level INFO Traefik does not print the useful logging messages related to let's encrypt and legolog. When I change the log level to DEBUG though I do see the useful let's encrypt messages, but the sheer amount of other legitimate debugging logs is completely overwhelming.

Is there an option to stay at log level INFO but include let's encrypt logging?

Here are a few example let's encrypt logs that are only DEBUG. Notice how the log level from legolog client is INFO hence I suggest these should be INFO in Traefik as well.

time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] acme: Registering account for me@example.com"
time="2022-02-23T03:17:01Z" level=debug msg="Using DNS Challenge provider: cloudflare" providerName=le.acme
time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Obtaining bundled SAN certificate"
time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] [[me.example.com](http://me.example.com)] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/81226275600"
time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] [[me.example.com](http://me.example.com)] acme: Could not find solver for: tls-alpn-01"
time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Could not find solver for: http-01"
time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] [me.example.com] acme: use dns-01 solver"
time="2022-02-23T03:17:01Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Preparing to solve DNS-01"
time="2022-02-23T03:17:02Z" level=debug msg="legolog: [INFO] cloudflare: new record for me.example.com, ID dffc9d7733dbe3ea50827086884f971c"
time="2022-02-23T03:17:02Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Trying to solve DNS-01"
time="2022-02-23T03:17:02Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Checking DNS record propagation using [10.96.0.10:53]"
10.244.2.1 - - [23/Feb/2022:03:17:04 +0000] "GET /ping HTTP/1.1" 200 2 "-" "-" 27 "ping@internal" "-" 0ms
10.244.2.1 - - [23/Feb/2022:03:17:04 +0000] "GET /ping HTTP/1.1" 200 2 "-" "-" 28 "ping@internal" "-" 0ms
time="2022-02-23T03:17:04Z" level=debug msg="legolog: [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]"
time="2022-02-23T03:17:04Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Waiting for DNS record propagation."
time="2022-02-23T03:17:06Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Waiting for DNS record propagation."
10.244.2.1 - - [23/Feb/2022:03:17:14 +0000] "GET /ping HTTP/1.1" 200 2 "-" "-" 29 "ping@internal" "-" 0ms
10.244.2.1 - - [23/Feb/2022:03:17:14 +0000] "GET /ping HTTP/1.1" 200 2 "-" "-" 30 "ping@internal" "-" 0ms
time="2022-02-23T03:17:16Z" level=debug msg="legolog: [INFO] [me.example.com] The server validated our request"
time="2022-02-23T03:17:16Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Cleaning DNS-01 challenge"
time="2022-02-23T03:17:16Z" level=debug msg="legolog: [INFO] [me.example.com] acme: Validations succeeded; requesting certificates"

Hello @nodesocket

Currently, there is a global LogLevel configuration, so there is no way to set INFO for Traefik and DEBUG for Let's Encrypt (ACME). You are always welcome to open a proposal on our Github repository and suggest that enhancement.

However, if we consider a real production use case, the logs that are being generated by containers are usually processed by any external logging aggregation solutions that can filter logs accordingly. There are a lot of available solutions or you can try to build your own using e.g. Elastic Stack, but it is a separate topic.

While working with the terminal I prefer to use stern and use its exclude filter.

Thanks,
Jakub