OSDN Git Service

feat(version): update version to 1.1.0
[bytom/bytom.git] / log / log.go
index 398157e..f616c87 100644 (file)
@@ -12,7 +12,7 @@ import (
        rotatelogs "github.com/lestrrat-go/file-rotatelogs"
        "github.com/sirupsen/logrus"
 
-       "github.com/bytom/config"
+       "github.com/bytom/bytom/config"
 )
 
 const (
@@ -68,8 +68,11 @@ func (hook *BtmHook) ioWrite(entry *logrus.Entry) error {
                return err
        }
 
-       _, err = writer.Write(msg)
-       return err
+       if _, err = writer.Write(msg); err != nil {
+               return err
+       }
+
+       return writer.Close()
 }
 
 func clearLockFiles(logPath string) error {