jenkinsci / docker-plugin

Jenkins cloud plugin that uses Docker
https://plugins.jenkins.io/docker-plugin/
MIT License
487 stars 322 forks source link

Prevent annoying message from being logged every 5 minutes #996

Closed Pexers closed 11 months ago

Pexers commented 12 months ago

What feature do you want to see added?

Have the option to disable the below message from being logged every 5 minutes: Will not cleanup superfluous containers on DockerCloud [name=docker, dockerURI=unix:///var/run/docker.sock], as it is disabled

Example:

Jul 30, 2023 12:48:31 PM INFO com.nirima.jenkins.plugins.docker.DockerContainerWatchdog processCloud
Will not cleanup superfluous containers on DockerCloud [name=docker, dockerURI=unix:///var/run/docker.sock], as it is disabled
Jul 30, 2023 12:53:31 PM INFO com.nirima.jenkins.plugins.docker.DockerContainerWatchdog processCloud
Will not cleanup superfluous containers on DockerCloud [name=docker, dockerURI=unix:///var/run/docker.sock], as it is disabled
Jul 30, 2023 12:58:31 PM INFO com.nirima.jenkins.plugins.docker.DockerContainerWatchdog processCloud
Will not cleanup superfluous containers on DockerCloud [name=docker, dockerURI=unix:///var/run/docker.sock], as it is disabled
Jul 30, 2023 1:03:31 PM INFO com.nirima.jenkins.plugins.docker.DockerContainerWatchdog processCloud
Will not cleanup superfluous containers on DockerCloud [name=docker, dockerURI=unix:///var/run/docker.sock], as it is disabled

Upstream changes

No response

Peter-Darton-i2 commented 11 months ago

IMO you're right, it's just noise. I don't think it needs to be made configurable; if someone really wants to see that message then they can add a logger specific to that class to say "I want debug messages from that class".

Best thing to do would be to submit a PR that downgrades that log message from INFO to DEBUG. i.e. change LOGGER.info to LOGGER.debug on that line

Pexers commented 11 months ago

Good suggestion @Peter-Darton-i2, will do that, thanks!