OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae829f1
)
Optimize log time accuracy (#1593)
author
yahtoo
<yahtoo.ma@gmail.com>
Thu, 28 Feb 2019 02:12:48 +0000
(10:12 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Thu, 28 Feb 2019 02:12:48 +0000
(10:12 +0800)
cmd/bytomd/main.go
patch
|
blob
|
history
diff --git
a/cmd/bytomd/main.go
b/cmd/bytomd/main.go
index
999ad2c
..
4afb0d3
100644
(file)
--- a/
cmd/bytomd/main.go
+++ b/
cmd/bytomd/main.go
@@
-5,6
+5,7
@@
import (
"path"
"runtime"
"strings"
+ "time"
log "github.com/sirupsen/logrus"
"github.com/tendermint/tmlibs/cli"
@@
-41,7
+42,7
@@
func (hook ContextHook) Fire(entry *log.Entry) error {
}
func init() {
- log.SetFormatter(&log.TextFormatter{
FullTimestamp: true
, DisableColors: true})
+ log.SetFormatter(&log.TextFormatter{
TimestampFormat: time.StampMilli
, DisableColors: true})
// If environment variable BYTOM_DEBUG is not empty,
// then add the hook to logrus and set the log level to DEBUG