traefik / traefik-helm-chart

Traefik Proxy Helm Chart
https://traefik.io
Apache License 2.0
1.09k stars 762 forks source link

chore: allow TRACE log level #1224

Closed fty4 closed 1 month ago

fty4 commented 1 month ago

What does this PR do?

Allow to specify log level TRACE which is a valid Traefik log level. see: https://doc.traefik.io/traefik/observability/logs/#level

Motivation

I tried to debug something and needed TRACE as log.level which was forbidden by this chart:

Error: Failed to render chart: exit status 1: Error: values don't meet the specifications of the schema(s) in the following chart(s):
traefik:
- logs.general.level: logs.general.level must be one of the following: "INFO", "WARN", "ERROR", "FATAL", "PANIC", "DEBUG"

More

mloiseleur commented 1 month ago

@fty4 Thanks for this PR :+1: . You're right, we missed it. I left small suggestion in order to display (and configure) it with severity order, like on Traefik Proxy documentation. Wdyt ?

fty4 commented 1 month ago

Hi @mloiseleur just saw after I deployed my modified version that no log on level TRACE was printed.

After reviewing the traefik/traefik sourcecode I saw that not one logger.Trace() was called - I guess the level is [never used](https://github.com/search?q=repo%3Atraefik%2Ftraefik%20logger.Trace()&type=code). zerolog allows to specify that level - because of that it might be "allowed".

Knowing this we might just close this PR, right? Might better to remove the level from the main repository documentation?

fty4 commented 1 month ago

I am fine with that - you can merge it! Also we get the correct order of the severity as you suggested.