Skip to content

Commit

Permalink
bind: replace route with short-url http log mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Choraden authored and mmatczuk committed Sep 7, 2023
1 parent 1df1df3 commit dc1a869
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bind/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,18 @@ func HTTPServerConfig(fs *pflag.FlagSet, cfg *forwarder.HTTPServerConfig, prefix

httpLogModes := []httplog.Mode{
httplog.None,
httplog.Route,
httplog.ShortURL,
httplog.URL,
httplog.Headers,
httplog.Body,
httplog.Errors,
}
fs.Var(anyflag.NewValue[httplog.Mode](cfg.LogHTTPMode, &cfg.LogHTTPMode, anyflag.EnumParser[httplog.Mode](httpLogModes...)),
namePrefix+"log-http", "<none|route|url|headers|body|errors>"+
namePrefix+"log-http", "<none|short-url|url|headers|body|errors>"+
"HTTP request and response logging mode. "+
"By default, request line and headers are logged if response status code is greater than or equal to 500. "+
"Setting this to none disables logging. ")
"Setting this to none disables logging. "+
"The short-url mode logs [scheme://]host[/path] instead of the full URL. ")
}

func TLSServerConfig(fs *pflag.FlagSet, cfg *forwarder.TLSServerConfig, namePrefix string) {
Expand Down

0 comments on commit dc1a869

Please sign in to comment.