Documentation
¶
Index ¶
- type AppLogger
- func (l *AppLogger) DPanic(args ...interface{})
- func (l *AppLogger) DPanicf(template string, args ...interface{})
- func (l *AppLogger) Debug(args ...interface{})
- func (l *AppLogger) Debugf(template string, args ...interface{})
- func (l *AppLogger) Err(msg string, err error)
- func (l *AppLogger) Error(args ...interface{})
- func (l *AppLogger) Errorf(template string, args ...interface{})
- func (l *AppLogger) Fatal(args ...interface{})
- func (l *AppLogger) Fatalf(template string, args ...interface{})
- func (l *AppLogger) Info(args ...interface{})
- func (l *AppLogger) Infof(template string, args ...interface{})
- func (l *AppLogger) InitLogger()
- func (l *AppLogger) Logger() *zap.Logger
- func (l *AppLogger) Panic(args ...interface{})
- func (l *AppLogger) Panicf(template string, args ...interface{})
- func (l *AppLogger) Printf(template string, args ...interface{})
- func (l *AppLogger) SugarLogger() *zap.SugaredLogger
- func (l *AppLogger) Sync() error
- func (l *AppLogger) Warn(args ...interface{})
- func (l *AppLogger) WarnMsg(msg string, err error)
- func (l *AppLogger) Warnf(template string, args ...interface{})
- func (l *AppLogger) WithName(name string)
- type Config
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppLogger ¶
type AppLogger struct {
Level string
DevMode bool
Encoding string
// contains filtered or unexported fields
}
Application logger
func (*AppLogger) DPanic ¶
func (l *AppLogger) DPanic(args ...interface{})
DPanic uses fmt.Sprint to construct and log a message. In development, the logger then panics. (See DPanicLevel for details.)
func (*AppLogger) DPanicf ¶
DPanicf uses fmt.Sprintf to log a templated message. In development, the logger then panics. (See DPanicLevel for details.)
func (*AppLogger) Debug ¶
func (l *AppLogger) Debug(args ...interface{})
Debug uses fmt.Sprint to construct and log a message.
func (*AppLogger) Error ¶
func (l *AppLogger) Error(args ...interface{})
Error uses fmt.Sprint to construct and log a message.
func (*AppLogger) Fatal ¶
func (l *AppLogger) Fatal(args ...interface{})
Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit.
func (*AppLogger) Info ¶
func (l *AppLogger) Info(args ...interface{})
Info uses fmt.Sprint to construct and log a message
func (*AppLogger) Panic ¶
func (l *AppLogger) Panic(args ...interface{})
Panic uses fmt.Sprint to construct and log a message, then panics.
func (*AppLogger) SugarLogger ¶
func (l *AppLogger) SugarLogger() *zap.SugaredLogger
func (*AppLogger) Warn ¶
func (l *AppLogger) Warn(args ...interface{})
Warn uses fmt.Sprint to construct and log a message.
type Logger ¶
type Logger interface {
InitLogger()
Sync() error
Logger() *zap.Logger
SugarLogger() *zap.SugaredLogger
Debug(args ...interface{})
Debugf(template string, args ...interface{})
Info(args ...interface{})
Infof(template string, args ...interface{})
Warn(args ...interface{})
Warnf(template string, args ...interface{})
WarnMsg(msg string, err error)
Error(args ...interface{})
Errorf(template string, args ...interface{})
Err(msg string, err error)
DPanic(args ...interface{})
DPanicf(template string, args ...interface{})
Fatal(args ...interface{})
Fatalf(template string, args ...interface{})
Printf(template string, args ...interface{})
WithName(name string)
}
Logger methods interface