Incorporate rkamudhan's comment.

This commit is contained in:
Tomofumi Hayashi
2018-07-12 12:15:53 +09:00
parent 6e33bf9921
commit 371b27b16a
3 changed files with 7 additions and 7 deletions

View File

@@ -124,7 +124,7 @@ func SetLogFile (filename string) {
}
func init() {
loggingStderr = false
loggingStderr = true
loggingFp = nil
loggingLevel = PanicLevel
}

View File

@@ -52,11 +52,11 @@ func LoadNetConf(bytes []byte) (*NetConf, error) {
}
// Logging
if netconf.Logging != "" {
logging.SetLogFile(netconf.Logging)
if netconf.LogFile != "" {
logging.SetLogFile(netconf.LogFile)
}
if netconf.LoggingLevel != "" {
logging.SetLogLevel(netconf.LoggingLevel)
if netconf.LogLevel != "" {
logging.SetLogLevel(netconf.LogLevel)
}
// Parse previous result

View File

@@ -38,8 +38,8 @@ type NetConf struct {
RawDelegates []map[string]interface{} `json:"delegates"`
Delegates []*DelegateNetConf `json:"-"`
Kubeconfig string `json:"kubeconfig"`
Logging string `json:"logging"`
LoggingLevel string `json:"logging_level"`
LogFile string `json:"logFile"`
LogLevel string `json:"logLevel"`
}
type DelegateNetConf struct {