Documentation
¶
Index ¶
- func GlobalLogger() (logger *zap.SugaredLogger)
- func NewZapCustom(options ...zap.Option) (*zap.Logger, error)
- func SetGlobalLogger(l *zap.SugaredLogger)
- type Fake
- func (*Fake) Error(...interface{})
- func (*Fake) Errorf(string, ...interface{})
- func (*Fake) Fatal(...interface{})
- func (*Fake) Fatalf(string, ...interface{})
- func (*Fake) Info(...interface{})
- func (*Fake) Infof(string, ...interface{})
- func (*Fake) Infow(string, ...interface{})
- func (f *Fake) Named(string) Logger
- func (*Fake) Warn(...interface{})
- func (*Fake) Warnf(string, ...interface{})
- func (f *Fake) With(...interface{}) Logger
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalLogger ¶
func GlobalLogger() (logger *zap.SugaredLogger)
func NewZapCustom ¶
NewZapCustom builds a custom Logger that writes InfoLevel and above logs to standard error in a human-friendly format.
It's a shortcut for newZapCustomConfig().Build(...Option).
func SetGlobalLogger ¶
func SetGlobalLogger(l *zap.SugaredLogger)
SetLogger supports setting external logger for the library.
Types ¶
type Logger ¶
type Logger interface {
// recursion doesn't
Named(name string) Logger
With(args ...interface{}) Logger
Info(args ...interface{})
Infof(template string, args ...interface{})
Infow(msg string, keysAndValues ...interface{})
Warn(args ...interface{})
Warnf(template string, args ...interface{})
Error(args ...interface{})
Errorf(template string, args ...interface{})
Fatal(args ...interface{})
Fatalf(template string, args ...interface{})
}
Click to show internal directories.
Click to hide internal directories.