Documentation ¶
Index ¶
- func NewLogger() *zap.Logger
- func NewZapLog(path, prefix string, stdoutFlag bool) *zap.Logger
- func NewZlog(debugLevel bool) (logger *zap.Logger)
- type ZapLogger
- func (l *ZapLogger) Debug(args ...interface{})
- func (l *ZapLogger) Debugf(template string, args ...interface{})
- func (l *ZapLogger) Error(args ...interface{})
- func (l *ZapLogger) Errorf(template string, args ...interface{})
- func (l *ZapLogger) FastHttpZapLogHandler(next phi.RequestHandlerFunc) phi.RequestHandlerFunc
- func (l *ZapLogger) Fatal(args ...interface{})
- func (l *ZapLogger) Fatalf(template string, args ...interface{})
- func (l *ZapLogger) Info(args ...interface{})
- func (l *ZapLogger) Infof(template string, args ...interface{})
- func (l *ZapLogger) Panic(args ...interface{})
- func (l *ZapLogger) Panicf(template string, args ...interface{})
- func (l *ZapLogger) Print(args ...interface{})
- func (l *ZapLogger) Printf(format string, args ...interface{})
- func (l *ZapLogger) Warn(args ...interface{})
- func (l *ZapLogger) Warnf(template string, args ...interface{})
- func (l *ZapLogger) With(key string, value interface{}) *ZapLogger
- func (l *ZapLogger) WithField(key string, value interface{}) *ZapLogger
- func (l *ZapLogger) WithFields(fields map[string]interface{}) *ZapLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ZapLogger ¶
func InitZaoLogger ¶ added in v0.3.1
InitZaoLogger initial
func NewDevelopment ¶ added in v0.3.1
func NewDevelopment() *ZapLogger
NewDevelopment new log for development
func NewProduction ¶ added in v0.3.1
func NewProduction() *ZapLogger
NewProduction new log for production
func (*ZapLogger) Debug ¶
func (l *ZapLogger) Debug(args ...interface{})
Debug logs a message at level Debug on the ZapLogger.
func (*ZapLogger) Error ¶
func (l *ZapLogger) Error(args ...interface{})
Error logs a message at level Error on the ZapLogger.
func (*ZapLogger) FastHttpZapLogHandler ¶
func (l *ZapLogger) FastHttpZapLogHandler(next phi.RequestHandlerFunc) phi.RequestHandlerFunc
FastHttpZapLogHandler middle-ware for fasthttp
func (*ZapLogger) Fatal ¶
func (l *ZapLogger) Fatal(args ...interface{})
Fatal logs a message at level Fatal on the ZapLogger.
func (*ZapLogger) Info ¶
func (l *ZapLogger) Info(args ...interface{})
Info logs a message at level Info on the ZapLogger.
func (*ZapLogger) Panic ¶
func (l *ZapLogger) Panic(args ...interface{})
Panic logs a message at level Painc on the ZapLogger.
func (*ZapLogger) Print ¶
func (l *ZapLogger) Print(args ...interface{})
Print logs a message at level Info on the ZapLogger.
func (*ZapLogger) Warn ¶
func (l *ZapLogger) Warn(args ...interface{})
Warn logs a message at level Warn on the ZapLogger.
func (*ZapLogger) WithFields ¶
WithFields return a logger with extra fields.
Click to show internal directories.
Click to hide internal directories.