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() { func init() {
loggingStderr = false loggingStderr = true
loggingFp = nil loggingFp = nil
loggingLevel = PanicLevel loggingLevel = PanicLevel
} }

View File

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

View File

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