Documentation ¶
Index ¶
- Constants
- func ParseLevel(str string) logLevel
- type Field
- type Logger
- type ZapLogger
- func (l ZapLogger) Debug(args ...interface{})
- func (l ZapLogger) Debugf(format string, args ...interface{})
- func (l ZapLogger) Error(args ...interface{})
- func (l ZapLogger) Errorf(format string, args ...interface{})
- func (l ZapLogger) Fatal(args ...interface{})
- func (l ZapLogger) Fatalf(format string, args ...interface{})
- func (l ZapLogger) Info(args ...interface{})
- func (l ZapLogger) Infof(format string, args ...interface{})
- func (l ZapLogger) Warn(args ...interface{})
- func (l ZapLogger) Warnf(format string, args ...interface{})
- func (l ZapLogger) WithFields(level logLevel, msg string, fields ...Field)
Constants ¶
View Source
const ( InfoLevel logLevel = "info" DebugLevel logLevel = "debug" WarnLevel logLevel = "warn" ErrorLevel logLevel = "error" )
Variables ¶
This section is empty.
Functions ¶
func ParseLevel ¶
func ParseLevel(str string) logLevel
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field used for structured logging
func (*Field) GetZapType ¶ added in v0.0.31
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) WithFields(level logLevel, msg string, fields ...Field) }
func NewDefaultLogger ¶
func NewZapLogger ¶
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
func (ZapLogger) WithFields ¶
Click to show internal directories.
Click to hide internal directories.