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

logrus defaults to stderr causing logging service issues #4833

Closed
kevin-shelaga opened this issue Jun 2, 2021 · 0 comments · Fixed by solo-io/go-utils#463 or #5250
Closed

logrus defaults to stderr causing logging service issues #4833

kevin-shelaga opened this issue Jun 2, 2021 · 0 comments · Fixed by solo-io/go-utils#463 or #5250
Assignees
Labels
Size: XS 1 day or less Type: Bug Something isn't working

Comments

@kevin-shelaga
Copy link
Contributor

kevin-shelaga commented Jun 2, 2021

Describe the bug
Gloo uses logrus which defaults to stderr, this can cause issues with services like stackdriver where info/warning are categorized automatically as error.

gloo/go.mod

Line 117 in 91514aa

github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.4.2

sirupsen/logrus@f8f0884 (cant find if this was ever reverted, and it doesn't seem like it was)

Potential Implementation (performance considerations):
sirupsen/logrus#403

or simply changing to stdout for all logs

log.SetOutput(os.Stdout)

To Reproduce
Steps to reproduce the behavior:

  1. run gloo in gke
  2. look in stackdriver for gloo pods
  3. every log categorized as error
{ "level": "info", "caller": "extauth/extauth_translator_syncer.go:64", "logger": "gloo-ee.v1.event_loop.setup.v1.event_loop.extAuthTranslatorSyncer", "msg": "end auth sync 17532171319258945120", "ts": 1.622668995331006E9, "version": "1.6.29" } 

logName: "projects/my-test-1234/logs/stderr"

Expected behavior
debug/info/warning should all be written to stdout
error/fatal/panic should all be written to stderr

Additional context
Add any other context about the problem here, e.g.

  • Gloo Edge version - v1.6.29
  • Kubernetes version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: XS 1 day or less Type: Bug Something isn't working
Projects
None yet
4 participants