OSDN Git Service

fix log fix_log_err
authorwz <mars@bytom.io>
Tue, 13 Aug 2019 07:35:27 +0000 (15:35 +0800)
committerwz <mars@bytom.io>
Tue, 13 Aug 2019 07:35:27 +0000 (15:35 +0800)
README.md
log/log.go
p2p/security/security.go

index e8e838e..55fd282 100644 (file)
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ cast in consensus around, and choose how many rounds of consensus to allocate th
 
 ### Merger utxo
 UTXO has been merged to solve the problem that too much UTXO input causes a failed send transaction to fail. 
-[details](./toolbar/merger_utxo/README.md)
+[details](./cmd/utxomerge/README.md)
 
 ## License
 
index c766483..818e5ef 100644 (file)
@@ -68,15 +68,18 @@ 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 {
        files, err := ioutil.ReadDir(logPath)
        if os.IsNotExist(err) {
                return nil
-       }else if err != nil {
+       } else if err != nil {
                return err
        }
 
index 7c9e945..47d5128 100644 (file)
@@ -6,7 +6,7 @@ import (
        cfg "github.com/vapor/config"
 )
 
-const logModule = "p2p/security"
+const logModule = "p2pSecurity"
 
 type Security struct {
        filter        *PeerFilter