All logs should log to stdout by default
Currently all logging is going to stderr
http_address = "http://127.0.0.1:5180"
request_logging = true
cookie_secret = "foo"
client_id = "foo"
client_secret = "foo"
email_domains = [ "foo.com" ][2020/04/02 20:48:27] [oauthproxy.go:261] OAuthProxy configured for Google Client ID: foo
[2020/04/02 20:48:27] [oauthproxy.go:267] Cookie settings: name:_oauth2_proxy secure(https):true httponly:true expiry:168h0m0s domain: path:/ samesite: refresh:disabled
[2020/04/02 20:48:27] [http.go:92] HTTP: listening on 127.0.0.1:5180
127.0.0.1 - - [2020/04/02 20:48:57] 127.0.0.1:5180 GET - "/ping" HTTP/1.1 "curl/7.58.0" 200 2 0.000
127.0.0.1 - - [2020/04/02 20:48:59] 127.0.0.1:5180 GET - "/ping" HTTP/1.1 "curl/7.58.0" 200 2 0.000
127.0.0.1 - - [2020/04/02 20:49:00] 127.0.0.1:5180 GET - "/ping" HTTP/1.1 "curl/7.58.0" 200 2 0.000Notice everything is going out stderr and not stdout
The reason this is important is our syslog logging systems that read from our docker containers then assume log lines coming our stderr are ERROR log level when this are just INFO and not something we need to pay attention to
oauth2_proxy-v5.1.0.linux-amd64.go1.14 binary
5.1.0
Most likely just a single line change here https://github.com/oauth2-proxy/oauth2-proxy/blob/master/pkg/logger/logger.go#L101 to os.Stdout,
Ideally the project would still write errors to stderr, though I don't think our logging currently has the ability to distinguish errors from info logs, might need more than just a one line change, but I'm open to a PR to fix this
This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.
This is still relevant, I think we should try to implement this
This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.
I'd still like to see this fixed at some point