Documentation
¶
Index ¶
- func CustomLevelEncoder(level zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func SyslogTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Fields
- type ILogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomLevelEncoder ¶
func CustomLevelEncoder(level zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a message at DebugLevel with string format
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs a message at ErrorLevel with string format
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at FatalLevel with string format
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a message at InfoLevel with string format
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf logs a message at PanicLevel with string format
func Printf ¶
func Printf(format string, args ...interface{})
Printf logs a message at InfoLevel with string format
func SyslogTimeEncoder ¶
func SyslogTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
type Fields ¶
type Fields map[string]interface{}
Fields Type to pass when we want to call WithFields for structured logging
type ILogger ¶
type ILogger interface {
Error(args ...interface{})
Errorf(format string, args ...interface{})
Fatal(args ...interface{})
Fatalf(format string, args ...interface{})
Info(args ...interface{})
Infof(format string, args ...interface{})
Warn(args ...interface{})
Warnf(format string, args ...interface{})
Debug(args ...interface{})
Debugf(format string, args ...interface{})
Panic(args ...interface{})
Panicf(format string, args ...interface{})
Print(args ...interface{})
Printf(format string, args ...interface{})
Println(args ...interface{})
WithFields(keyValues Fields) ILogger
WithField(key string, value interface{}) ILogger
}
ILogger is our contract for the logger
func NewZapLogger ¶
func NewZapLogger() ILogger
func WithField ¶ added in v0.0.2
WithField returns a new logger instance which can Log a message at the given level with a key and a value
func WithFields ¶
WithFields returns a new logger instance which can Log a message at the given level with context key/value pairs