Documentation ¶
Index ¶
- type Logger
- func (logger Logger) DPanic(args ...interface{})
- func (logger Logger) DPanicf(template string, args ...interface{})
- func (logger Logger) Debug(args ...interface{})
- func (logger Logger) Debugf(template string, args ...interface{})
- func (logger Logger) Error(args ...interface{})
- func (logger Logger) Errorf(template string, args ...interface{})
- func (logger Logger) Fatal(args ...interface{})
- func (logger Logger) Fatalf(template string, args ...interface{})
- func (logger Logger) Info(args ...interface{})
- func (logger Logger) Infof(template string, args ...interface{})
- func (logger Logger) Panic(args ...interface{})
- func (logger Logger) Panicf(template string, args ...interface{})
- func (logger Logger) Sync()
- func (logger Logger) Warn(args ...interface{})
- func (logger Logger) Warnf(template string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { //Logger only supports structured logging (less features more performance) Logger *zap.Logger //Sugar supports structured and printf-style APIs (less performance more features) Sugar *zap.SugaredLogger }
Logger wrapper with two Logger methods
func (Logger) DPanic ¶
func (logger Logger) DPanic(args ...interface{})
DPanic uses fmt.Sprint to construct and log a message. In development, the logger then panics. (See DPanicLevel for details.)
func (Logger) DPanicf ¶
DPanicf uses fmt.Sprintf to log a templated message. In development, the logger then panics. (See DPanicLevel for details.)
func (Logger) Debug ¶
func (logger Logger) Debug(args ...interface{})
Debug uses fmt.Sprint to construct and log a message.
func (Logger) Error ¶
func (logger Logger) Error(args ...interface{})
Error uses fmt.Sprint to construct and log a message.
func (Logger) Fatal ¶
func (logger Logger) Fatal(args ...interface{})
Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit.
func (Logger) Info ¶
func (logger Logger) Info(args ...interface{})
Info uses fmt.Sprint to construct and log a message.
func (Logger) Panic ¶
func (logger Logger) Panic(args ...interface{})
Panic uses fmt.Sprint to construct and log a message, then panics.
Click to show internal directories.
Click to hide internal directories.