Documentation ¶
Overview ¶
Package log provides a 12-factor convenience wrapper around zap
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Debugw(msg string, fields ...zapcore.Field)
- func Error(args ...interface{})
- func ErrorOnPanic()
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Errorw(msg string, fields ...zapcore.Field)
- func Fatal(args ...interface{})
- func FatalOnPanic()
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func Fatalw(msg string, fields ...zapcore.Field)
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func Infow(msg string, fields ...zapcore.Field)
- func L() *zap.Logger
- func Replace(l *zap.Logger)
- func Silence()
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warnln(args ...interface{})
- func Warnw(msg string, fields ...zapcore.Field)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorOnPanic ¶
func ErrorOnPanic()
ErrorOnPanic logs error if func panics. Usage:
func someFunc() { defer log.ErrorOnPanic() ... // code that may panic() }
func FatalOnPanic ¶
func FatalOnPanic()
FatalOnPanic calls Fatal if func panics. Usage:
func someFunc() { defer log.FatalOnPanic() ... // code that may panic() }
func Replace ¶
Replace allows you to replace the global logger. Example:
scoped := log.L().Named("worker").With( zap.String("key", "value"), ) log.Replace(scoped)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.