bndr / gojenkins

Jenkins API Client in Go. Looking for maintainers to move this project forward.
Apache License 2.0
874 stars 447 forks source link

Use of Loggers Incompatible with using VividCortex/godaemon #104

Open ArcticSnowman opened 7 years ago

ArcticSnowman commented 7 years ago

When you create a daemon app using https://github.com/VividCortex/godaemon there is a issue where the disconnection of the StdOut and StdErr causes Jenkins.Init() to fail and exit.

I believe it the InitLoggers() operation that causes the issue.

Really the logging should be left to the application this package is used in not for this package to dictate how to log.

ArcticSnowman commented 7 years ago

Turns out this might be something to do with net/http Do() call

ArcticSnowman commented 7 years ago

OK, after further digging this is a complex issue with something to do with the app doing a 'log.SetOutput' to a multi writer with OS.Stderr and some thing else.. Not sure if the bug is here or net/http or log or all of the above..