You've already forked oauth2-proxy
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:
committed by
Tanvir Alam
parent
3c51c914ac
commit
9341dcbf79
3
main.go
3
main.go
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user