Documentation
¶
Index ¶
- Constants
- func Debug(msg string, fields ...Field)
- func Debugf(format string, a ...interface{})
- func Error(msg string, fields ...Field)
- func Errorf(format string, a ...interface{})
- func Fatal(msg string, fields ...Field)
- func Fatalf(format string, a ...interface{})
- func FieldTozapField(fields ...Field) (fds []zap.Field)
- func Info(msg string, fields ...Field)
- func Infof(format string, a ...interface{})
- func OnInit(config map[string]interface{}, option ...Optionfn) (err error)
- func Panic(msg string, fields ...Field)
- func Panicf(format string, a ...interface{})
- func Warn(msg string, fields ...Field)
- func Warnf(format string, a ...interface{})
- type Field
- type ILog
- type LogEncoder
- type LogStrut
- type Logger
- func (this *Logger) Debug(msg string, fields ...Field)
- func (this *Logger) Debugf(format string, a ...interface{})
- func (this *Logger) Error(msg string, fields ...Field)
- func (this *Logger) Errorf(format string, a ...interface{})
- func (this *Logger) Fatal(msg string, fields ...Field)
- func (this *Logger) Fatalf(format string, a ...interface{})
- func (this *Logger) Info(msg string, fields ...Field)
- func (this *Logger) Infof(format string, a ...interface{})
- func (this *Logger) Panic(msg string, fields ...Field)
- func (this *Logger) Panicf(format string, a ...interface{})
- func (this *Logger) Warn(msg string, fields ...Field)
- func (this *Logger) Warnf(format string, a ...interface{})
- type Loglevel
- type Optionfn
- type Options
Constants ¶
View Source
const ( DebugLevel = iota InfoLevel WarnLevel ErrorLevel PanicLevel FatalLevel )
Variables ¶
This section is empty.
Functions ¶
func FieldTozapField ¶
Types ¶
type ILog ¶
type ILog interface { Debug(msg string, fields ...Field) Info(msg string, fields ...Field) Warn(msg string, fields ...Field) Error(msg string, fields ...Field) Panic(msg string, fields ...Field) Fatal(msg string, fields ...Field) Debugf(format string, a ...interface{}) Infof(format string, a ...interface{}) Warnf(format string, a ...interface{}) Errorf(format string, a ...interface{}) Panicf(format string, a ...interface{}) Fatalf(format string, a ...interface{}) }
type Optionfn ¶
type Optionfn func(*Options)
func SetDebugMode ¶
func SetEncoder ¶
func SetEncoder(v LogEncoder) Optionfn
func SetFileName ¶
func SetLogMaxAge ¶
func SetLogMaxBackups ¶
func SetLogMaxSize ¶
func SetLoglayer ¶
func SetLoglevel ¶
Click to show internal directories.
Click to hide internal directories.