crazy-max / diun

Receive notifications when an image is updated on a Docker registry
https://crazymax.dev/diun/
MIT License
2.78k stars 108 forks source link

Make "info" logs less verbose #1104

Open burkart opened 4 months ago

burkart commented 4 months ago

Description

Using the default LOG_LEVEL "info", the log contains 4 lines per (Cron) execution even though nothing out of the ordinary happened:

[timestamp] INF Cron triggered
[timestamp] INF Found 123 image(s) to analyze provider=docker
[timestamp] INF Jobs completed added=0 failed=0 skipped=0 unchanged=123 updated=0
[timestamp] INF Next run in 6 hours 2 seconds ([timestamp])

Setting the LOG_LEVEL to "warn" is undesirable because that would disable "info" output for updated images:

[timestamp] INF Cron triggered
[timestamp] INF Found 123 image(s) to analyze provider=docker
[timestamp] INF Image update found image=docker.io/hello-world:latest provider=docker
[timestamp] INF Jobs completed added=0 failed=0 skipped=0 unchanged=122 updated=1
[timestamp] INF Next run in 5 hours 59 minutes ([timestamp])

Suggestion:

Demote outputs from "info" to "debug" (or introduce intermediate level "verbose") that contain little valuable information: