Open adriferracuti opened 3 years ago
Seems like it is by design, from docs:
That logger writes to standard error and prints the date and time of each logged message.
So with standard packages all fmt.Print("Hello")
goes to stdout, and log.Print("World")
to stderr
Workaround for this might be to redefine output with help of SetOutput, like:
log.SetOutput(os.Stdout)
Or even add an optional flag that will switch behavior
Hi, first of all thank you very much!
I noticed that the info logs are written to stderr, thus showing up as errors on the GCP logs explorer (Kubernetes):