Make request logging format configurable

This commit is contained in:
Paul Seiffert
2017-12-04 12:52:47 -05:00
committed by Tanvir Alam
parent 3c51c914ac
commit 9341dcbf79
3 changed files with 75 additions and 44 deletions
+2 -1
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()