forked from github/multus-cni
Incorporate rkamudhan's comment.
This commit is contained in:
@@ -124,7 +124,7 @@ func SetLogFile (filename string) {
|
||||
}
|
||||
|
||||
func init() {
|
||||
loggingStderr = false
|
||||
loggingStderr = true
|
||||
loggingFp = nil
|
||||
loggingLevel = PanicLevel
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user