mirror of https://bitbucket.org/ausocean/av.git
Fix missed log updates
This commit is contained in:
parent
898b231521
commit
6578511dc8
|
@ -242,7 +242,7 @@ func main() {
|
||||||
config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr]
|
config.IntraRefreshPeriod = *configFlags[intraRefreshPeriodPtr]
|
||||||
|
|
||||||
// Also give the config a logger object
|
// Also give the config a logger object
|
||||||
config.Logger = smartLogger.New(loggerVerbosity, smartLogger.White)
|
config.Logger = smartLogger.New(loggerVerbosity, smartLogger.File, "/var/log/netsender/")
|
||||||
|
|
||||||
//init netsender
|
//init netsender
|
||||||
if *netSenderFlagPtr {
|
if *netSenderFlagPtr {
|
||||||
|
@ -257,14 +257,14 @@ func main() {
|
||||||
for *netSenderFlagPtr {
|
for *netSenderFlagPtr {
|
||||||
varsChanged, err := netSend()
|
varsChanged, err := netSend()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
config.logger.log("revidCLI","Error", err.Error())
|
config.Logger.Log("revidCLI","Error", err.Error())
|
||||||
time.Sleep(time.Duration(netSendRetryTime) * time.Second)
|
time.Sleep(time.Duration(netSendRetryTime) * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if varsChanged {
|
if varsChanged {
|
||||||
if vars["mode"] == "Paused" {
|
if vars["mode"] == "Paused" {
|
||||||
if !paused {
|
if !paused {
|
||||||
config.logger.log("revidCLI","Info", "Pausing revid")
|
config.Logger.Log("revidCLI","Info", "Pausing revid")
|
||||||
stopRevid()
|
stopRevid()
|
||||||
paused = true
|
paused = true
|
||||||
}
|
}
|
||||||
|
@ -477,7 +477,7 @@ func createRevidInstance() {
|
||||||
// If the config does have a logger, use it to output error, otherwise
|
// If the config does have a logger, use it to output error, otherwise
|
||||||
// just output to std output
|
// just output to std output
|
||||||
if config.Logger != nil {
|
if config.Logger != nil {
|
||||||
config.logger.log("revidCLI","FATAL ERROR", err.Error())
|
config.Logger.Log("revidCLI","FATAL ERROR", err.Error())
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("FATAL ERROR: %v", err.Error())
|
fmt.Printf("FATAL ERROR: %v", err.Error())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue