Documentation ¶
Index ¶
- func NewLogger(debugLevel bool) (logger *zap.Logger)
- func NewStdoutCore(level zapcore.Level) zapcore.Core
- func NewZapCore(path, prefix string, level zapcore.Level) zapcore.Core
- func NewZapLog(path, prefix string, stdoutFlag bool) *zap.Logger
- type ZapLogger
- func (l *ZapLogger) Debug(args ...interface{})
- func (l *ZapLogger) Error(args ...interface{})
- func (l *ZapLogger) FastHttpZapLogHandler(next phi.HandlerFunc) phi.HandlerFunc
- func (l *ZapLogger) Fatal(args ...interface{})
- func (l *ZapLogger) Info(args ...interface{})
- func (l *ZapLogger) Panic(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) 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 ¶
func NewZapCore ¶ added in v0.2.2
NewZapLog initial a zap logger
Types ¶
type ZapLogger ¶
ZapLogger is a logger which compatible to logrus/std zlog/prometheus. it implements Print() Println() Printf() Dbug() Debugln() Debugf() Info() Infoln() Infof() Warn() Warnln() Warnf() Error() Errorln() Errorf() Fatal() Fataln() Fatalf() Panic() Panicln() Panicf() With() WithField() WithFields()
func NewZapLogger ¶
NewZapLogger return ZapLogger with caller field
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.HandlerFunc) phi.HandlerFunc
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.
Directories ¶
Path | Synopsis |
---|---|
Package diode provides a thread-safe, lock-free, non-blocking io.Writer wrapper.
|
Package diode provides a thread-safe, lock-free, non-blocking io.Writer wrapper. |