mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-24 22:26:04 +03:00
61 lines
1.1 KiB
Go
61 lines
1.1 KiB
Go
package logger
|
|
|
|
import (
|
|
"go.uber.org/zap"
|
|
"go.uber.org/zap/zapcore"
|
|
)
|
|
|
|
type Nil struct{}
|
|
|
|
func NewNil() Logger {
|
|
return &Nil{}
|
|
}
|
|
|
|
func (l *Nil) With(fields ...zap.Field) Logger {
|
|
return l
|
|
}
|
|
|
|
func (l *Nil) WithLazy(fields ...zap.Field) Logger {
|
|
return l
|
|
}
|
|
|
|
func (l *Nil) Level() zapcore.Level {
|
|
return zapcore.DebugLevel
|
|
}
|
|
|
|
func (l *Nil) Check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry {
|
|
return &zapcore.CheckedEntry{}
|
|
}
|
|
|
|
func (l *Nil) Log(lvl zapcore.Level, msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) Debug(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) Info(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) Warn(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) Error(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) DPanic(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) Panic(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) Fatal(msg string, fields ...zap.Field) {}
|
|
|
|
func (l *Nil) ForHandler(handler any) Logger {
|
|
return l
|
|
}
|
|
|
|
func (l *Nil) ForConnection(conn any) Logger {
|
|
return l
|
|
}
|
|
|
|
func (l *Nil) ForAccount(acc any) Logger {
|
|
return l
|
|
}
|
|
|
|
func (l *Nil) Sync() error {
|
|
return nil
|
|
}
|