Documentation
¶
Index ¶
- func Debug(a ...interface{})
- func DebugFields(fields ...kv.Field)
- func Debugf(s string, a ...interface{})
- func Error(a ...interface{})
- func ErrorFields(fields ...kv.Field)
- func Errorf(s string, a ...interface{})
- func Fatal(a ...interface{})
- func FatalFields(fields ...kv.Field)
- func Fatalf(s string, a ...interface{})
- func IncludeCaller() bool
- func Info(a ...interface{})
- func InfoFields(fields ...kv.Field)
- func Infof(s string, a ...interface{})
- func Log(calldepth int, lvl LEVEL, a ...interface{})
- func LogFields(calldepth int, lvl LEVEL, fields ...kv.Field)
- func Logf(calldepth int, lvl LEVEL, s string, a ...interface{})
- func Panic(a ...interface{})
- func PanicFields(fields ...kv.Field)
- func Panicf(s string, a ...interface{})
- func Print(a ...interface{})
- func PrintFields(fields ...kv.Field)
- func Printf(s string, a ...interface{})
- func SetIncludeCaller(verbose bool)
- func SetLevel(lvl LEVEL)
- func SetOutput(out io.Writer)
- func Warn(a ...interface{})
- func WarnFields(fields ...kv.Field)
- func Warnf(s string, a ...interface{})
- type LEVEL
- type Logger
- func (l *Logger) Debug(a ...interface{})
- func (l *Logger) DebugFields(fields ...kv.Field)
- func (l *Logger) Debugf(s string, a ...interface{})
- func (l *Logger) Error(a ...interface{})
- func (l *Logger) ErrorFields(fields ...kv.Field)
- func (l *Logger) Errorf(s string, a ...interface{})
- func (l *Logger) Fatal(a ...interface{})
- func (l *Logger) FatalFields(fields ...kv.Field)
- func (l *Logger) Fatalf(s string, a ...interface{})
- func (l *Logger) IncludeCaller() bool
- func (l *Logger) Info(a ...interface{})
- func (l *Logger) InfoFields(fields ...kv.Field)
- func (l *Logger) Infof(s string, a ...interface{})
- func (l *Logger) Level() LEVEL
- func (l *Logger) Log(calldepth int, lvl LEVEL, a ...interface{})
- func (l *Logger) LogFields(calldepth int, lvl LEVEL, fields ...kv.Field)
- func (l *Logger) Logf(calldepth int, lvl LEVEL, s string, a ...interface{})
- func (l *Logger) Logger() *log.Logger
- func (l *Logger) Panic(a ...interface{})
- func (l *Logger) PanicFields(fields ...kv.Field)
- func (l *Logger) Panicf(s string, a ...interface{})
- func (l *Logger) Print(a ...interface{})
- func (l *Logger) PrintFields(fields ...kv.Field)
- func (l *Logger) Printf(s string, a ...interface{})
- func (l *Logger) SetIncludeCaller(enabled bool)
- func (l *Logger) SetLevel(lvl LEVEL)
- func (l *Logger) SetOutput(out io.Writer)
- func (l *Logger) Warn(a ...interface{})
- func (l *Logger) WarnFields(fields ...kv.Field)
- func (l *Logger) Warnf(s string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugFields ¶
func DebugFields(fields ...kv.Field)
func ErrorFields ¶
func ErrorFields(fields ...kv.Field)
func FatalFields ¶
func FatalFields(fields ...kv.Field)
func IncludeCaller ¶
func IncludeCaller() bool
func InfoFields ¶
func InfoFields(fields ...kv.Field)
func PanicFields ¶
func PanicFields(fields ...kv.Field)
func PrintFields ¶
func PrintFields(fields ...kv.Field)
func SetIncludeCaller ¶
func SetIncludeCaller(verbose bool)
func WarnFields ¶
func WarnFields(fields ...kv.Field)
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger wraps the stdlib log.Logger to provided levelled logging.
func New ¶
New returns a new instance of Logger writing to given output. A minimum call depth may be specified to skip caller frames in caller info.
func NewFrom ¶
NewFrom returns a new instance of Logger wrapping the provided standard library logger. A minimum call depth may be specified to skip caller frames in caller info.
func (*Logger) DebugFields ¶
func (l *Logger) DebugFields(fields ...kv.Field)
func (*Logger) ErrorFields ¶
func (l *Logger) ErrorFields(fields ...kv.Field)
func (*Logger) FatalFields ¶
func (l *Logger) FatalFields(fields ...kv.Field)
func (*Logger) IncludeCaller ¶
IncludeCaller returns whether 'IncludeCaller' is enabled.
func (*Logger) InfoFields ¶
func (l *Logger) InfoFields(fields ...kv.Field)
func (*Logger) Log ¶
Log calls underlying stdlib log.Logger.Output() to print to the logger with level. Arguments are handled in the manner of fmt.Print.
func (*Logger) LogFields ¶
Logf calls underlying stdlib log.Logger.Output() to print to the logger with level. Arguments formatted using fv.Fields{}.String().
func (*Logger) Logf ¶
Logf calls underlying stdlib log.Logger.Output() to print to the logger with level. Arguments are handled in the manner of fmt.Printf.
func (*Logger) PanicFields ¶
func (l *Logger) PanicFields(fields ...kv.Field)
func (*Logger) Print ¶
func (l *Logger) Print(a ...interface{})
Print calls underlying stdlib log.Logger.Output() to print to the logger. Arguments are handled in the manner of fmt.Print.
func (*Logger) PrintFields ¶
func (l *Logger) PrintFields(fields ...kv.Field)
PrintFields calls underlying stdlib log.Logger.Output() to print to the logger. Arguments formatted using fv.Fields{}.String().
func (*Logger) Printf ¶
Printf calls underlying stdlib log.Logger.Output() to print to the logger. Arguments are handled in the manner of fmt.Printf.
func (*Logger) SetIncludeCaller ¶
SetIncludeCaller enables/disbables logging with added caller information.
func (*Logger) WarnFields ¶
func (l *Logger) WarnFields(fields ...kv.Field)