diff --git a/pkg/config/flags.go b/pkg/config/flags.go index e0014b96..2fcb27a6 100644 --- a/pkg/config/flags.go +++ b/pkg/config/flags.go @@ -241,7 +241,7 @@ func RegisterServerConfigFlags(cmd *cobra.Command, c *v1.ServerConfig, opts ...R cmd.PersistentFlags().StringVarP(&c.Log.Level, "log_level", "", "info", "log level") cmd.PersistentFlags().Int64VarP(&c.Log.MaxDays, "log_max_days", "", 3, "log max days") cmd.PersistentFlags().BoolVarP(&c.Log.DisablePrintColor, "disable_log_color", "", false, "disable log color in console") - cmd.PersistentFlags().StringVarP(&c.Log.DurationTypes, "log_duration_types", "", "ssh,rdp", "log duration types") + cmd.PersistentFlags().StringVarP(&c.Log.DurationTypes, "log_duration_types", "", "", "log duration types") cmd.PersistentFlags().StringVarP(&c.Auth.Token, "token", "t", "", "auth token") cmd.PersistentFlags().StringVarP(&c.SubDomainHost, "subdomain_host", "", "", "subdomain host") cmd.PersistentFlags().VarP(&PortsRangeSliceFlag{V: &c.AllowPorts}, "allow_ports", "", "allow ports") diff --git a/server/proxy/proxy.go b/server/proxy/proxy.go index dd944e3c..862a943d 100644 --- a/server/proxy/proxy.go +++ b/server/proxy/proxy.go @@ -293,7 +293,7 @@ func IsTheTypeToLog(logDurationTypes string, name string, xl *xlog.Logger) bool } thestrlist := strings.Split(logDurationTypes, ",") for i := 0; i < len(thestrlist); i++ { - if (thestrlist[i]!="") && strings.Contains(name, thestrlist[i]) { + if (thestrlist[i] != "") && strings.Contains(name, thestrlist[i]) { xl.Infof("The duration of each connection through this Proxy will be logged.") return true }