Logo
Explore Help
Sign In
fluencelabs/tendermint
1
0
Fork 0
You've already forked tendermint
mirror of https://github.com/fluencelabs/tendermint synced 2025-05-09 05:22:13 +00:00
Code Issues Projects Releases Wiki Activity
tendermint/libs/log/nop_logger.go

18 lines
420 B
Go
Raw Normal View History

Logger interface and tmLogger impl based on go-kit
2017-04-27 13:42:03 +04:00
package log
type nopLogger struct{}
changes per @ethanfrey comments
2017-05-04 19:39:16 +04:00
// Interface assertions
var _ Logger = (*nopLogger)(nil)
Logger interface and tmLogger impl based on go-kit
2017-04-27 13:42:03 +04:00
// NewNopLogger returns a logger that doesn't do anything.
func NewNopLogger() Logger { return &nopLogger{} }
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.
2017-09-18 18:01:14 -07:00
func (nopLogger) Info(string, ...interface{}) {}
func (nopLogger) Debug(string, ...interface{}) {}
func (nopLogger) Error(string, ...interface{}) {}
changes per @ethanfrey comments
2017-05-04 19:39:16 +04:00
func (l *nopLogger) With(...interface{}) Logger {
return l
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 101ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API