mirror of https://bitbucket.org/ausocean/av.git
ensure only one logger is ever created
This commit is contained in:
parent
90288f546a
commit
369beab55c
|
@ -241,12 +241,12 @@ func main() {
|
|||
config.Timeout = *configFlags[timeoutPtr]
|
||||
config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr]
|
||||
|
||||
// Also give the config a logger object
|
||||
config.Logger = smartlogger.New(loggerVerbosity, smartlogger.File, "/var/log/netsender/")
|
||||
|
||||
//init netsender
|
||||
if *netSenderFlagPtr {
|
||||
netsenderInit()
|
||||
} else {
|
||||
// Also give the config a logger object
|
||||
config.Logger = smartlogger.New(loggerVerbosity, smartlogger.File, "/var/log/netsender/")
|
||||
}
|
||||
|
||||
time.Sleep(time.Duration(prepTime) * time.Second)
|
||||
|
|
Loading…
Reference in New Issue