diff options
Diffstat (limited to 'exit.go')
| -rw-r--r-- | exit.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -6,7 +6,6 @@ import ( "time" "go.wit.com/lib/cobol" - "go.wit.com/log" ) // since we know when the command starts (duh, this parses os.Args) @@ -35,7 +34,7 @@ func (pb *Argv) GoodExit(msg string) { } else { appname = pb.AppInfo.APPNAME } - log.Infof("%s: %s (%s)\n", appname, msg, cobol.FormatDuration(dur)) + fmt.Printf("%s: %s (%s)\n", appname, msg, cobol.FormatDuration(dur)) os.Exit(0) } @@ -50,11 +49,11 @@ func (pb *Argv) BadExit(msg string, err error) { // If it does, call the method to get the slice of errors. allerr := u.Unwrap() for _, e := range allerr { - log.Info("Error:", e) + fmt.Printf("Error: (%v)\n", e) } } else { // If it's not a joined error, you can fall back to the single-unwrap loop. - log.Info("Error:", err) + fmt.Printf("Error: (%v)\n", u) } } @@ -65,7 +64,7 @@ func (pb *Argv) BadExit(msg string, err error) { } else { appname = pb.AppInfo.APPNAME } - log.Infof("%s error: %s (%s)\n", appname, msg, cobol.FormatDuration(dur)) + fmt.Printf("%s error: %s (%s)\n", appname, msg, cobol.FormatDuration(dur)) os.Exit(1) } @@ -88,7 +87,7 @@ func ExitWatchdog() { return case t := <-dog.C: _ = t - log.Info("argv.Exit() watchdog: stalled in", me.pb.AppInfo.APPNAME+".Exit()") + fmt.Println("argv.Exit() watchdog: stalled in", me.pb.AppInfo.APPNAME+".Exit()") // h.Scan() } } |
