argo-rollouts icon indicating copy to clipboard operation
argo-rollouts copied to clipboard

JSON Logging

Open DWSR opened this issue 2 years ago • 4 comments

Summary

Argo Rollouts is one of the few Argo projects that doesn't support JSON logging

Use Cases

When trying to naively parse logs using a log aggregator like Fluentd.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

DWSR avatar Mar 17 '22 19:03 DWSR

I am not sure since I didn't use it. However, it seems that the controller provides flags to change log format: https://github.com/argoproj/argo-rollouts/blob/master/cmd/rollouts-controller/main.go#L221

Therefore, I don't know whether it is documented or not but passing additional command-line arguments to the rollouts-controller may change its log format.

hcelaloner avatar Mar 21 '22 09:03 hcelaloner

@DWSR yes, that's correct --logformat=json will work. We just need to fix a documentation

perenesenko avatar Mar 22 '22 17:03 perenesenko

Hi @perenesenko if you do not have any different plans for this one, I can submit a PR similar to ArgoCD server command docs as follows: https://github.com/hcelaloner/argo-rollouts/commit/67d390077860024d361d118ce5d93d08c7ca4703 (may also move this new section to the end of installation.md, if that would be more appropriate?)

Edit: Submitted a PR may work on it or change it based on comments 👍

hcelaloner avatar Mar 22 '22 20:03 hcelaloner

When leader election is enabled there is one line that doesn't follow JSON format. 12:08:56.641662 1 leaderelection.go:248] attempting to acquire leader lease argocd/argo-rollouts-controller-lock...

AliDotS avatar Sep 11 '22 12:09 AliDotS

This issue is stale because it has been open 60 days with no activity.

github-actions[bot] avatar Nov 11 '22 03:11 github-actions[bot]

Not stale.

DWSR avatar Nov 11 '22 03:11 DWSR

This issue is stale because it has been open 60 days with no activity.

github-actions[bot] avatar Jan 12 '23 02:01 github-actions[bot]

Not stale.

Sineaggi avatar Jan 17 '23 23:01 Sineaggi

This issue is stale because it has been open 60 days with no activity.

github-actions[bot] avatar Mar 19 '23 02:03 github-actions[bot]

Not stale.

DWSR avatar Mar 19 '23 12:03 DWSR

@AliDotS presumably logs from klog aren't being mapped to logrus.

Sineaggi avatar Apr 06 '23 20:04 Sineaggi