mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
Begin writing RPC HTTP Server
This commit is contained in:
24
cmd/log.go
24
cmd/log.go
@@ -1,14 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/op/go-logging"
|
||||
"github.com/tendermint/tendermint/blocks"
|
||||
"github.com/tendermint/tendermint/consensus"
|
||||
"github.com/tendermint/tendermint/mempool"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/state"
|
||||
"os"
|
||||
)
|
||||
|
||||
var log = logging.MustGetLogger("main")
|
||||
@@ -16,23 +10,7 @@ var log = logging.MustGetLogger("main")
|
||||
func init() {
|
||||
// Customize the output format
|
||||
logging.SetFormatter(logging.MustStringFormatter("[%{level:.4s}] %{time:2006-01-02T15:04:05} %{shortfile:-20s} %{message}"))
|
||||
|
||||
logBackend := logging.NewLogBackend(os.Stderr, "", 0)
|
||||
logBackend.Color = true
|
||||
logging.SetBackend(logBackend)
|
||||
|
||||
// Test
|
||||
/*
|
||||
Log.Debug("debug")
|
||||
Log.Info("info")
|
||||
Log.Notice("notice")
|
||||
Log.Warning("warning")
|
||||
Log.Error("error")
|
||||
*/
|
||||
|
||||
blocks.SetBlocksLogger(log)
|
||||
consensus.SetConsensusLogger(log)
|
||||
mempool.SetMempoolLogger(log)
|
||||
p2p.SetP2PLogger(log)
|
||||
state.SetStateLogger(log)
|
||||
}
|
||||
|
Reference in New Issue
Block a user