mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
chore(etcd): print out go-etcd log in VeryVeryVerbose Mode
This commit is contained in:
parent
802aaf59db
commit
ea701b3adb
13
etcd.go
13
etcd.go
@ -24,6 +24,8 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
goetcd "github.com/coreos/etcd/third_party/github.com/coreos/go-etcd/etcd"
|
||||
golog "github.com/coreos/etcd/third_party/github.com/coreos/go-log/log"
|
||||
"github.com/coreos/etcd/third_party/github.com/goraft/raft"
|
||||
|
||||
"github.com/coreos/etcd/config"
|
||||
@ -53,6 +55,17 @@ func main() {
|
||||
if config.VeryVeryVerbose {
|
||||
log.Verbose = true
|
||||
raft.SetLogLevel(raft.Trace)
|
||||
goetcd.SetLogger(
|
||||
golog.New(
|
||||
"go-etcd",
|
||||
false,
|
||||
golog.CombinedSink(
|
||||
os.Stdout,
|
||||
"[%s] %s %-9s | %s\n",
|
||||
[]string{"prefix", "time", "priority", "message"},
|
||||
),
|
||||
),
|
||||
)
|
||||
} else if config.VeryVerbose {
|
||||
log.Verbose = true
|
||||
raft.SetLogLevel(raft.Debug)
|
||||
|
Loading…
x
Reference in New Issue
Block a user