Documentation ¶
Overview ¶
Package zap implements a mapper from "go.uber.org/zap"
Index ¶
- func New(kind Kind, dest zapcore.WriteSyncer) log.ContextualExtendedLogger
- func NewDevLogger(dest zapcore.WriteSyncer) log.ContextualExtendedLogger
- func NewProdLogger(dest zapcore.WriteSyncer) log.ContextualExtendedLogger
- type Kind
- type Logger
- func (l Logger) Log(lvl log.Level, args ...interface{})
- func (l Logger) Output() io.Writer
- func (l Logger) Print(args ...interface{})
- func (l Logger) Printf(fmt string, args ...interface{})
- func (l Logger) Println(args ...interface{})
- func (l Logger) SetOutput(o io.Writer)
- func (l Logger) With(fields ...interface{}) log.LeveledExtended
- func (l Logger) Write(b []byte) (int, error)
- func (l Logger) Zap() *zap.SugaredLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(kind Kind, dest zapcore.WriteSyncer) log.ContextualExtendedLogger
func NewDevLogger ¶
func NewDevLogger(dest zapcore.WriteSyncer) log.ContextualExtendedLogger
func NewProdLogger ¶
func NewProdLogger(dest zapcore.WriteSyncer) log.ContextualExtendedLogger
Types ¶
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
Logger is an Contextual logger wrapper over Logrus's logger.
func (Logger) SetOutput ¶
SetOutput will change the output of the logger. Hopefully. Once day. Right now it does nothing. TODO: Implement it. Duh.
func (Logger) With ¶
func (l Logger) With(fields ...interface{}) log.LeveledExtended
With wraps the zap sugared logger's With-method, which returns an explicit *zap.Sugared, which can't be abstracted without a wrapper :(
func (Logger) Zap ¶
func (l Logger) Zap() *zap.SugaredLogger
Click to show internal directories.
Click to hide internal directories.