fix log errors

This commit is contained in:
richardsonjack 2018-04-19 18:43:24 +09:30
parent ea0e086de9
commit 6592ea4901
1 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ LICENSE
package main package main
import ( import (
"fmt"
"errors" "errors"
"os/exec" "os/exec"
"flag" "flag"
@ -407,9 +408,9 @@ 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) config.Logger.Log("FATAL ERROR", err.Error())
} else { } else {
fmt.Printf("FATAL ERROR: %v", err) fmt.Printf("FATAL ERROR: %v", err.Error())
} }
} }
} }