diff --git a/libcontainer/generic_error.go b/libcontainer/generic_error.go index 93bb7570..3ed33da6 100644 --- a/libcontainer/generic_error.go +++ b/libcontainer/generic_error.go @@ -1,7 +1,6 @@ package libcontainer import ( - "fmt" "io" "text/template" "time" @@ -76,7 +75,7 @@ type genericError struct { } func (e *genericError) Error() string { - return fmt.Sprintf("[%d] %s: %s", e.ECode, e.ECode, e.Message) + return e.Message } func (e *genericError) Code() ErrorCode { diff --git a/main.go b/main.go index f8982f6e..c4cb0b60 100644 --- a/main.go +++ b/main.go @@ -100,7 +100,7 @@ func main() { logrus.SetLevel(logrus.DebugLevel) } if path := context.GlobalString("log"); path != "" { - f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) + f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0666) if err != nil { return err }