Documentation
¶
Overview ¶
* * @Author: myxy99 <myxy99@foxmail.com> * @Date: 2020/11/4 11:18
Index ¶
- Variables
- func DPanic(msg string, fields ...Field)
- func DPanicf(msg string, args ...interface{})
- func DPanicw(msg string, keysAndValues ...interface{})
- func Debug(msg string, fields ...Field)
- func DebugEncodeLevel(lv zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
- func Debugf(msg string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func DefaultZapConfig() *zapcore.EncoderConfig
- func Error(msg string, fields ...Field)
- func Errorf(msg string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(msg string, fields ...Field)
- func Fatalf(msg string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(msg string, fields ...Field)
- func Infof(msg string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Panic(msg string, fields ...Field)
- func Panicf(msg string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func RawConfig(key string) *options
- func SetDefaultLogger(o *options)
- func StdConfig(name ...string) *options
- func Warn(msg string, fields ...Field)
- func Warnf(msg string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type CloseFunc
- type Field
- func FieldAddr(value string) Field
- func FieldCode(value int32) Field
- func FieldComponent(value string) Field
- func FieldComponentName(value string) Field
- func FieldCost(value time.Duration) Field
- func FieldDescription(value string) Field
- func FieldErr(err error) Field
- func FieldErrKind(value string) Field
- func FieldEvent(value string) Field
- func FieldExtMessage(vals ...interface{}) Field
- func FieldIp(value string) Field
- func FieldKey(value string) Field
- func FieldKind(value string) Field
- func FieldMethod(value string) Field
- func FieldName(value string) Field
- func FieldPeerIP(value string) Field
- func FieldPeerName(value string) Field
- func FieldSize(value int32) Field
- func FieldStack(value []byte) Field
- func FieldType(value string) Field
- func FieldValue(value string) Field
- func FieldValueAny(value interface{}) Field
- type Func
- type Logger
- func (logger *Logger) AutoLevel(confKey string)
- func (logger *Logger) DPanic(msg string, fields ...Field)
- func (logger *Logger) DPanicf(template string, args ...interface{})
- func (logger *Logger) DPanicw(msg string, keysAndValues ...interface{})
- func (logger *Logger) Debug(msg string, fields ...Field)
- func (logger *Logger) Debugf(template string, args ...interface{})
- func (logger *Logger) Debugw(msg string, keysAndValues ...interface{})
- func (logger *Logger) Error(msg string, fields ...Field)
- func (logger *Logger) Errorf(template string, args ...interface{})
- func (logger *Logger) Errorw(msg string, keysAndValues ...interface{})
- func (logger *Logger) Fatal(msg string, fields ...Field)
- func (logger *Logger) Fatalf(template string, args ...interface{})
- func (logger *Logger) Fatalw(msg string, keysAndValues ...interface{})
- func (logger *Logger) Info(msg string, fields ...Field)
- func (logger *Logger) Infof(template string, args ...interface{})
- func (logger *Logger) Infow(msg string, keysAndValues ...interface{})
- func (logger *Logger) IsDebugMode() bool
- func (logger *Logger) Panic(msg string, fields ...Field)
- func (logger *Logger) Panicf(template string, args ...interface{})
- func (logger *Logger) Panicw(msg string, keysAndValues ...interface{})
- func (logger *Logger) StdLog() *log.Logger
- func (logger *Logger) Warn(msg string, fields ...Field)
- func (logger *Logger) Warnf(template string, args ...interface{})
- func (logger *Logger) Warnw(msg string, keysAndValues ...interface{})
- func (logger *Logger) With(fields ...Field) *Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // String ... String = zap.String // Any ... Any = zap.Any // Int64 ... Int64 = zap.Int64 // Int ... Int = zap.Int // Int32 ... Int32 = zap.Int32 // Uint ... Uint = zap.Uint // Duration ... Duration = zap.Duration // Object ... Object = zap.Object // Namespace ... Namespace = zap.Namespace // Reflect ... Reflect = zap.Reflect // Skip ... Skip = zap.Skip // ByteString ... ByteString = zap.ByteString // Float64 ... Float64 = zap.Float64 )
Functions ¶
func DebugEncodeLevel ¶
func DebugEncodeLevel(lv zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
func DefaultZapConfig ¶
func DefaultZapConfig() *zapcore.EncoderConfig
func SetDefaultLogger ¶
func SetDefaultLogger(o *options)
Types ¶
type CloseFunc ¶
type CloseFunc func() error
CloseFunc should be called when the caller exits to clean up buffers.
func Buffer ¶
func Buffer(ws zapcore.WriteSyncer, bufferSize int, flushInterval time.Duration) (zapcore.WriteSyncer, CloseFunc)
Buffer wraps a WriteSyncer in a buffer to improve performance, if bufferSize = 0, we set it to defaultBufferSize if flushInterval = 0, we set it to defaultFlushInterval
type Field ¶
func FieldComponent ¶
func FieldComponentName ¶
func FieldDescription ¶
func FieldPeerIP ¶
func FieldPeerName ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func DefaultLogger ¶
func DefaultLogger() *Logger
Click to show internal directories.
Click to hide internal directories.