argocd-image-updater
argocd-image-updater copied to clipboard
Loglevel setting not working
Describe the bug I am starting the image updater pod such:
containers:
- name: argocd-image-updater
image: argoprojlabs/argocd-image-updater:v0.11.0
command:
- /usr/local/bin/argocd-image-updater
- run
- --loglevel
- warn
Problem
the update still outputs info messages, instead of just warning (or higher).
Note: while the help for the --loglevel flag mentions warn as the correct log level name, the level name as show in log is warning (though using warning as flag value results in error)
Expected behavior log messages should be warn and higher only.
Additional context Add any other context about the problem here.
Version v0.11.0
I suspect the log messages you see may come from some dependency component, and not from the image updater itself.
Do you have examples of what is logged in info level despite setting log level to warn?
Note: while the help for the --loglevel flag mentions warn as the correct log level name, the level name as show in log is warning (though using warning as flag value results in error)
Hum. This sounds wrong, and we should fix it :)
Hi,
Thanks for the quick reply!
This is an example
time="2021-12-17T09:52:50Z" level=info msg=Trace args="[rm -rf /tmp/git-comp-dev602057691]" dir= operation_name="exec rm" time_ms=0.845043
Now that you mention it, looks like the vast majority of infos that the image updater container outputs are related to git.
another example:
argocd-image-updater-7bf4cb7d55-dhcwk argocd-image-updater time="2022-12-12T16:39:21Z" level=warning msg="temporarily disabling strict host key checking (i.e. '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'), please don't use in production"
when logLevel set to "error"
Would be also nice to get json logFormat as it is already supported in other ArgoCD components.