Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs from k8s aren't captured by logrus #2707

Closed
2 tasks
Sineaggi opened this issue Apr 10, 2023 · 1 comment · Fixed by #2701
Closed
2 tasks

Logs from k8s aren't captured by logrus #2707

Sineaggi opened this issue Apr 10, 2023 · 1 comment · Fixed by #2701
Labels
bug Something isn't working

Comments

@Sineaggi
Copy link
Contributor

Checklist:

  • I've included steps to reproduce the bug.
  • I've included the version of argo rollouts.

Describe the bug

The logging output don't include k8s logs in json format.

To Reproduce

Start the app with --logformat=json

Expected behavior

All logs should be formatted as json (using the same logger).

Screenshots

Version

1.4.1

Logs

# Paste the logs from the rollout controller

# Logs for the entire controller:
{"generation":320,"level":"info","msg":"Reconciliation completed","namespace":"default","resourceVersion":"5359174568","rollout":"my-app-name","time":"2023-04-10T17:16:00Z","time_ms":1723.9298860000001}
I0410 17:16:00.525100       1 trace.go:205] Trace[268113179]: "DeltaFIFO Pop Process" ID:default/another-app-here,Depth:424,Reason:slow event handlers blocking the queue (10-Apr-2023 17:16:00.349) (total time: 175ms):
Trace[268113179]: [175.828219ms] [175.828219ms] END
{"level":"info","msg":"Start processing","resource":"default/my-ui-name","time":"2023-04-10T17:16:00Z"}

# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME

Message from the maintainers:

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

@Sineaggi Sineaggi added the bug Something isn't working label Apr 10, 2023
@Sineaggi
Copy link
Contributor Author

Created new issue from comment #1914 (comment)

zachaller pushed a commit that referenced this issue Apr 11, 2023
* Add klog logrus bridge

Signed-off-by: Clayton Walker <[email protected]>

* Pull klog bridge out to log util

Signed-off-by: Clayton Walker <[email protected]>

* Upgrade logrusr to v4

Signed-off-by: Clayton Walker <[email protected]>

* Simplify logging

Signed-off-by: Clayton Walker <[email protected]>

---------

Signed-off-by: Clayton Walker <[email protected]>
zachaller pushed a commit that referenced this issue May 5, 2023
* Add klog logrus bridge

Signed-off-by: Clayton Walker <[email protected]>

* Pull klog bridge out to log util

Signed-off-by: Clayton Walker <[email protected]>

* Upgrade logrusr to v4

Signed-off-by: Clayton Walker <[email protected]>

* Simplify logging

Signed-off-by: Clayton Walker <[email protected]>

---------

Signed-off-by: Clayton Walker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant