mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-29 00:32:14 +00:00
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.
18 lines
420 B
Go
18 lines
420 B
Go
package log
|
|
|
|
type nopLogger struct{}
|
|
|
|
// Interface assertions
|
|
var _ Logger = (*nopLogger)(nil)
|
|
|
|
// NewNopLogger returns a logger that doesn't do anything.
|
|
func NewNopLogger() Logger { return &nopLogger{} }
|
|
|
|
func (nopLogger) Info(string, ...interface{}) {}
|
|
func (nopLogger) Debug(string, ...interface{}) {}
|
|
func (nopLogger) Error(string, ...interface{}) {}
|
|
|
|
func (l *nopLogger) With(...interface{}) Logger {
|
|
return l
|
|
}
|