mirror of https://bitbucket.org/ausocean/av.git
Merge branch 'master' of https://bitbucket.org/ausocean/av/src
This commit is contained in:
commit
074eab0fb2
|
@ -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("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("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("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())
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ func (r *revid) ChangeConfig(config Config) (err error) {
|
||||||
func (r *revid) Log(logType, m string) {
|
func (r *revid) Log(logType, m string) {
|
||||||
if r.config.Verbosity == Yes {
|
if r.config.Verbosity == Yes {
|
||||||
if r.config.Logger != nil {
|
if r.config.Logger != nil {
|
||||||
r.config.Logger.Log(logType, m)
|
r.config.logger.log("revid",logType, m)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Println(logType + ": " + m)
|
fmt.Println(logType + ": " + m)
|
||||||
|
|
Loading…
Reference in New Issue