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

Webhook and sensor log to stderr #884

Closed
l15k4 opened this issue Sep 17, 2020 · 8 comments · Fixed by #893
Closed

Webhook and sensor log to stderr #884

l15k4 opened this issue Sep 17, 2020 · 8 comments · Fixed by #893
Labels
bug Something isn't working
Milestone

Comments

@l15k4
Copy link

l15k4 commented Sep 17, 2020

Describe the bug
Webhook and sensor log to stderr which polutes stackdriver with errors.

Screenshots
Screenshot from 2020-09-17 08-09-43

Environment (please complete the following information):

  • Kubernetes: [e.g. v1.16]
  • Argo: [e.g. v2.10]
  • Argo Events: [e.g. v1.0.0]

Reason
This is probably related to logrus package. Its default output stream is stderr.

Solution
Good precaution could be using severity instead of level in the json object, it would at least make this common problem disappear on stackdriver.

@l15k4 l15k4 added the bug Something isn't working label Sep 17, 2020
@whynowy
Copy link
Member

whynowy commented Sep 17, 2020

It should addressed by making zap log configurable with a configmap.

@l15k4
Copy link
Author

l15k4 commented Sep 23, 2020

The Argo workflow sidecar container wait also logs everything to stderr ... it is really hard to setup monitoring for anything running on Argo right now.

@whynowy
Copy link
Member

whynowy commented Sep 23, 2020

Curious about how you concluded it logs to stderr? I thought it was just the keyword level, however it seems not. Can you explain more?

@l15k4
Copy link
Author

l15k4 commented Sep 24, 2020

We are using stackdriver where you can see what goes to stdout and stderr

@whynowy
Copy link
Member

whynowy commented Sep 24, 2020

I see. This is an easy fix. By default zap log use stderr as default output, we can change it to stdout. Question about the keyword level, is it reserved in stackdriver? or what is the problem?

@l15k4
Copy link
Author

l15k4 commented Sep 24, 2020

I meant, if the keyword was severity instead of level, then stackdriver would use it to determine the severity ... ie. even if it was put on stderr and there was severity=info then stackdriver would classify it as info ... otherwise stackdriver decides by type of output stderr => ERROR and stdout => INFO if the field severity is missing in the json

@whynowy
Copy link
Member

whynowy commented Sep 24, 2020

I see. Then updating info output to stdout should resolve the issue.

@l15k4
Copy link
Author

l15k4 commented Sep 24, 2020

Correct, I'm from the JVM world where it is very strict and one usually finds only problems on stderr ... but I've noticed that there are infos on stderr very casually in the golang world :-)

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.

2 participants