Documentation ¶
Index ¶
- Variables
- type Dummy
- func (z *Dummy) Debug(args ...interface{})
- func (z *Dummy) Debugf(template string, args ...interface{})
- func (z *Dummy) Error(args ...interface{})
- func (z *Dummy) Errorf(template string, args ...interface{})
- func (z *Dummy) Info(args ...interface{})
- func (z *Dummy) Infof(template string, args ...interface{})
- func (z Dummy) New(level Level) (Logger, error)
- func (z *Dummy) Warn(args ...interface{})
- func (z *Dummy) Warnf(template string, args ...interface{})
- func (z *Dummy) Warningf(template string, args ...interface{})
- func (z Dummy) WithFields(fields []Field, prefix string, suffix string) Logger
- type Field
- type Level
- type Logger
- type Zap
- func (z *Zap) Debug(args ...interface{})
- func (z *Zap) Debugf(template string, args ...interface{})
- func (z *Zap) Error(args ...interface{})
- func (z *Zap) Errorf(template string, args ...interface{})
- func (z *Zap) Info(args ...interface{})
- func (z *Zap) Infof(template string, args ...interface{})
- func (z Zap) New(level Level) (Logger, error)
- func (z Zap) NewWithConfig(cfg zap.Config) (Logger, error)
- func (z *Zap) Warn(args ...interface{})
- func (z *Zap) Warnf(template string, args ...interface{})
- func (z *Zap) Warningf(template string, args ...interface{})
- func (z Zap) WithFields(fields []Field, prefix string, suffix string) Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var Levels = [...]string{
"INFO",
"DEBUG",
}
Levels defines a pseudo enum of log levels
View Source
var ZapLevelMapping = map[Level]zapcore.Level{ INFO: zap.InfoLevel, DEBUG: zap.DebugLevel, }
ZapLevelMapping maps Zap log levels to node-reaper log levels
Functions ¶
This section is empty.
Types ¶
type Dummy ¶
type Dummy struct{}
Dummy provides a dummy logger implementation
type Level ¶
type Level int
Level is a pseudo enum for setting log levels
func StringToLogLevel ¶
StringToLogLevel converts a log level in string format to the corresponding int value
type Logger ¶
type Logger interface { Debug(...interface{}) Debugf(string, ...interface{}) Info(...interface{}) Infof(string, ...interface{}) Warn(...interface{}) Warnf(string, ...interface{}) Warningf(string, ...interface{}) Error(...interface{}) Errorf(string, ...interface{}) New(Level) (Logger, error) WithFields(fields []Field, prefix string, suffix string) Logger }
Logger is an interface that needs to be implemented in order to log.
type Zap ¶
type Zap struct {
// contains filtered or unexported fields
}
Zap provides a sugared logger implementation based on zap
func (Zap) NewWithConfig ¶
NewWithConfig creates a zap logger with the provided zap config
Click to show internal directories.
Click to hide internal directories.