Official Go implementation of the Bytom protocol
Revision | cae59de15261aa5f2fe14b8430e33146248dbf8b (tree) |
---|---|
Time | 2019-08-15 13:13:24 |
Author | Paladz <yzhu101@uott...> |
Commiter | GitHub |
Merge pull request #1779 from Bytom/dev-log
log writer close
@@ -68,8 +68,11 @@ func (hook *BtmHook) ioWrite(entry *logrus.Entry) error { | ||
68 | 68 | return err |
69 | 69 | } |
70 | 70 | |
71 | - _, err = writer.Write(msg) | |
72 | - return err | |
71 | + if _, err = writer.Write(msg); err != nil { | |
72 | + return err | |
73 | + } | |
74 | + | |
75 | + return writer.Close() | |
73 | 76 | } |
74 | 77 | |
75 | 78 | func clearLockFiles(logPath string) error { |
@@ -6,7 +6,7 @@ import ( | ||
6 | 6 | cfg "github.com/bytom/config" |
7 | 7 | ) |
8 | 8 | |
9 | -const logModule = "p2p/security" | |
9 | +const logModule = "p2pSecurity" | |
10 | 10 | |
11 | 11 | type Security struct { |
12 | 12 | filter *PeerFilter |