1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-11-25 22:32:57 +02:00

Make request logging format configurable

This commit is contained in:
Paul Seiffert
2017-07-14 13:08:34 +02:00
committed by Tanvir Alam
parent 3c51c914ac
commit 9341dcbf79
3 changed files with 75 additions and 44 deletions

View File

@@ -67,6 +67,7 @@ func main() {
flagSet.Bool("cookie-httponly", true, "set HttpOnly cookie flag")
flagSet.Bool("request-logging", true, "Log requests to stdout")
flagSet.String("request-logging-format", defaultRequestLoggingFormat, "Template for log lines")
flagSet.String("provider", "google", "OAuth provider")
flagSet.String("login-url", "", "Authentication endpoint")
@@ -124,7 +125,7 @@ func main() {
}
s := &Server{
Handler: LoggingHandler(os.Stdout, oauthproxy, opts.RequestLogging),
Handler: LoggingHandler(os.Stdout, oauthproxy, opts.RequestLogging, opts.RequestLoggingFormat),
Opts: opts,
}
s.ListenAndServe()