2018-08-10 17:06:00 +02:00
|
|
|
package logger
|
|
|
|
|
2018-08-25 21:30:25 +02:00
|
|
|
type nullLogger struct{}
|
2018-08-10 17:06:00 +02:00
|
|
|
|
|
|
|
var _ Logger = nullLogger{}
|
|
|
|
|
|
|
|
func NewNullLogger() Logger {
|
|
|
|
return nullLogger{}
|
|
|
|
}
|
|
|
|
|
2018-08-25 21:30:25 +02:00
|
|
|
func (n nullLogger) WithOutlet(outlet Outlet, level Level) Logger { return n }
|
2018-08-10 17:06:00 +02:00
|
|
|
func (n nullLogger) ReplaceField(field string, val interface{}) Logger { return n }
|
2018-08-25 21:30:25 +02:00
|
|
|
func (n nullLogger) WithField(field string, val interface{}) Logger { return n }
|
|
|
|
func (n nullLogger) WithFields(fields Fields) Logger { return n }
|
|
|
|
func (n nullLogger) WithError(err error) Logger { return n }
|
|
|
|
func (nullLogger) Debug(msg string) {}
|
|
|
|
func (nullLogger) Info(msg string) {}
|
|
|
|
func (nullLogger) Warn(msg string) {}
|
|
|
|
func (nullLogger) Error(msg string) {}
|
|
|
|
func (nullLogger) Printf(format string, args ...interface{}) {}
|