mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-15 06:11:20 +00:00
change logger interface to not return errors (Refs #50)
See https://github.com/go-kit/kit/issues/164 for discussion of why kitlog returns an error. ``` Package log is designed to be used for more than simple application info/warning/error logging; it's suitable for log-structured data in an e.g. Lambda architecture, where each invocation is important. I agree with you that if we were doing only application logging the error would be more noise than signal. But the scope of the package is larger than that. ``` Since we are doing only application logging and we're not checking errors, it is safe to get rid them.
This commit is contained in:
committed by
Ethan Buchman
parent
9a2438e0dc
commit
65a07b80a3
@ -7,17 +7,6 @@ import (
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
)
|
||||
|
||||
func TestTMLogger(t *testing.T) {
|
||||
t.Parallel()
|
||||
logger := log.NewTMLogger(ioutil.Discard)
|
||||
if err := logger.Info("Hello", "abc", 123); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if err := logger.With("def", "ghi").Debug(""); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkTMLoggerSimple(b *testing.B) {
|
||||
benchmarkRunner(b, log.NewTMLogger(ioutil.Discard), baseInfoMessage)
|
||||
}
|
||||
|
Reference in New Issue
Block a user