mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-06 08:07:11 +00:00
update log interface
This commit is contained in:
@@ -16,7 +16,7 @@ func main() {
|
||||
abciPtr := flag.String("abci", "socket", "socket | grpc")
|
||||
flag.Parse()
|
||||
|
||||
logger := log.NewTMLogger(os.Stdout)
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
|
||||
// Start the listener
|
||||
srv, err := server.NewServer(*addrPtr, *abciPtr, NewChainAwareApplication())
|
||||
@@ -24,7 +24,7 @@ func main() {
|
||||
logger.Error(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
srv.SetLogger(log.With(logger, "module", "abci-server"))
|
||||
srv.SetLogger(logger.With("module", "abci-server"))
|
||||
|
||||
// Wait forever
|
||||
cmn.TrapSignal(func() {
|
||||
|
||||
@@ -19,7 +19,7 @@ func TestChainAware(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
srv.SetLogger(log.With(log.TestingLogger(), "module", "abci-server"))
|
||||
srv.SetLogger(log.TestingLogger().With("module", "abci-server"))
|
||||
defer srv.Stop()
|
||||
|
||||
// Connect to the socket
|
||||
@@ -27,7 +27,7 @@ func TestChainAware(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Error starting socket client: %v", err.Error())
|
||||
}
|
||||
client.SetLogger(log.With(log.TestingLogger(), "module", "abci-client"))
|
||||
client.SetLogger(log.TestingLogger().With("module", "abci-client"))
|
||||
client.Start()
|
||||
defer client.Stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user