Documentation
¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func SetLogger(logger Logger)
- type Logger
- type ZapLogger
- func (z ZapLogger) Debug(args ...interface{})
- func (z ZapLogger) Debugf(template string, args ...interface{})
- func (z ZapLogger) Error(args ...interface{})
- func (z ZapLogger) Errorf(template string, args ...interface{})
- func (z ZapLogger) Fatal(args ...interface{})
- func (z ZapLogger) Fatalf(template string, args ...interface{})
- func (z ZapLogger) Info(args ...interface{})
- func (z ZapLogger) Infof(template string, args ...interface{})
- func (z ZapLogger) Panic(args ...interface{})
- func (z ZapLogger) Panicf(template string, args ...interface{})
- func (z ZapLogger) Sugar() *zap.SugaredLogger
- func (z ZapLogger) Warn(args ...interface{})
- func (z ZapLogger) Warnf(template string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(template string, args ...interface{}) Info(args ...interface{}) Infof(template string, args ...interface{}) Error(args ...interface{}) Errorf(template string, args ...interface{}) }
Logger is basic interface for integrating custom logger
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
ZapLogger object using simple SugaredLogger
func NewZapLogger ¶
NewZapLogger creates a zap production or development logger based on debug argument
func NewZapLoggerFromSugar ¶
func NewZapLoggerFromSugar(sl zap.SugaredLogger) *ZapLogger
NewZapLoggerFromSugar creates a ZapLogger from a zap.SugaredLogger
func (ZapLogger) Debug ¶
func (z ZapLogger) Debug(args ...interface{})
Debug uses zap to log a debug message.
func (ZapLogger) Error ¶
func (z ZapLogger) Error(args ...interface{})
Error uses zap to log a error message.
func (ZapLogger) Fatal ¶
func (z ZapLogger) Fatal(args ...interface{})
Fatal uses zap to log a fatal message.
func (ZapLogger) Info ¶
func (z ZapLogger) Info(args ...interface{})
Info uses zap to log a info message.
func (ZapLogger) Panic ¶
func (z ZapLogger) Panic(args ...interface{})
Panic uses zap to log a panic message.
func (ZapLogger) Sugar ¶
func (z ZapLogger) Sugar() *zap.SugaredLogger
Sugar returns the underlying sugared zap logger that ZapLogger uses
Click to show internal directories.
Click to hide internal directories.