update log interface

This commit is contained in:
Anton Kaliaev
2017-05-04 23:17:16 +04:00
parent d2a4b16b28
commit 1dc3629b1a
11 changed files with 31 additions and 29 deletions
+2 -2
View File
@@ -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() {
+2 -2
View File
@@ -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()