Documentation ¶
Index ¶
- Variables
- func Debug(msg string, fields ...Field)
- func Debugf(format string, v ...interface{})
- func Error(msg string, fields ...Field)
- func Errorf(format string, v ...interface{})
- func ExNewLogger()
- func Fatal(msg string, fields ...Field)
- func Fatalf(format string, v ...interface{})
- func Info(msg string, fields ...Field)
- func Infof(format string, v ...interface{})
- func NewLogger(tops []TeeOption, level Level, opts ...Option)
- func Panic(msg string, fields ...Field)
- func Panicf(format string, v ...interface{})
- func Warn(msg string, fields ...Field)
- func Warnf(format string, v ...interface{})
- func ZapLogger() *zap.Logger
- type Field
- type Level
- type LevelEnablerFunc
- type Logger
- func (z *Logger) Debug(msg string, fields ...Field)
- func (z *Logger) Debugf(format string, v ...interface{})
- func (z *Logger) Error(msg string, fields ...Field)
- func (z *Logger) Errorf(format string, v ...interface{})
- func (z *Logger) Fatal(msg string, fields ...Field)
- func (z *Logger) Fatalf(format string, v ...interface{})
- func (z *Logger) Info(msg string, fields ...Field)
- func (z *Logger) Infof(format string, v ...interface{})
- func (z *Logger) Panic(msg string, fields ...Field)
- func (z *Logger) Panicf(format string, v ...interface{})
- func (z *Logger) Warn(msg string, fields ...Field)
- func (z *Logger) Warnf(format string, v ...interface{})
- type Option
- type RotateOptions
- type TeeOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Skip = zap.Skip Binary = zap.Binary Bool = zap.Bool Boolp = zap.Boolp ByteString = zap.ByteString Complex128 = zap.Complex128 Complex128p = zap.Complex128p Complex64 = zap.Complex64 Complex64p = zap.Complex64p Float64 = zap.Float64 Float64p = zap.Float64p Float32 = zap.Float32 Float32p = zap.Float32p Int = zap.Int Intp = zap.Intp Int64 = zap.Int64 Int64p = zap.Int64p Int32 = zap.Int32 Int32p = zap.Int32p Int16 = zap.Int16 Int16p = zap.Int16p Int8 = zap.Int8 Int8p = zap.Int8p String = zap.String Stringp = zap.Stringp Uint = zap.Uint Uintp = zap.Uintp Uint64 = zap.Uint64 Uint64p = zap.Uint64p Uint32 = zap.Uint32 Uint32p = zap.Uint32p Uint16 = zap.Uint16 Uint16p = zap.Uint16p Uint8 = zap.Uint8 Uint8p = zap.Uint8p Uintptr = zap.Uintptr Uintptrp = zap.Uintptrp Reflect = zap.Reflect Namespace = zap.Namespace Stringer = zap.Stringer Time = zap.Time Timep = zap.Timep Stack = zap.Stack StackSkip = zap.StackSkip Duration = zap.Duration Durationp = zap.Durationp Any = zap.Any Err = zap.Error // it is used to differ from func Error )
Functions ¶
Types ¶
type Level ¶
const ( InfoLevel Level = zap.InfoLevel // 0, default level WarnLevel Level = zap.WarnLevel // 1 ErrorLevel Level = zap.ErrorLevel // 2 DPanicLevel Level = zap.DPanicLevel // 3, used in development log // PanicLevel logs a message, then panics PanicLevel Level = zap.PanicLevel // 4 // FatalLevel logs a message, then calls os.Exit(1). FatalLevel Level = zap.FatalLevel // 5 DebugLevel Level = zap.DebugLevel // -1 )
type LevelEnablerFunc ¶
type LevelEnablerFunc = zap.LevelEnablerFunc
type RotateOptions ¶
Filename: filepath + filename (the place file stored) MaxSize:the max mememory of a log file(MB) MaxBackups:the max number of log files stored MaxAges:the latest time stored old log files Compress:whether to compress and archive old files
type TeeOption ¶
type TeeOption struct { Filename string Ropt RotateOptions Lef LevelEnablerFunc }
Click to show internal directories.
Click to hide internal directories.