File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ func main() {
128
128
viper .AutomaticEnv ()
129
129
viper .SetEnvPrefix ("ts" )
130
130
131
- // Commandline over-rides config file for debugging
131
+ // Enable debug mode if specified by commandline argument, regardless of what is in config file
132
132
if * flagDebugOn {
133
133
viper .Set ("Debug" , true )
134
134
log .SetLevel (log .TraceLevel )
@@ -182,6 +182,11 @@ func main() {
182
182
}
183
183
}
184
184
185
+ // enable debug mode if specified in config file, even if not specified by commandline argument
186
+ if viper .GetBool ("Debug" ) == true {
187
+ log .SetLevel (log .TraceLevel )
188
+ }
189
+
185
190
basePath := viper .GetString ("BasePath" )
186
191
log .Infof ("Serving HTTP at %s/" , formatBaseURL (fmt .Sprintf ("http://%s:%d" ,
187
192
viper .GetString ("HttpHost" ), viper .GetInt ("HttpPort" )), basePath ))
You can’t perform that action at this time.
0 commit comments