Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(msg string, fields ...zap.Field)
- func Debugf(msg string, args ...interface{})
- func Error(msg string, fields ...Field)
- func Errorf(msg string, args ...interface{})
- func Errorw(msg string, args ...interface{})
- func Fatal(msg string, fields ...Field)
- func Fatalf(msg string, args ...interface{})
- func Fatalw(msg string, args ...interface{})
- func Flush()
- func Info(msg string, fields ...Field)
- func Infof(msg string, args ...interface{})
- func Init(opt *Option)
- func Panic(msg string, fields ...Field)
- func Panicf(msg string, args ...interface{})
- func Panicw(msg string, args ...interface{})
- func Warn(msg string, fields ...Field)
- func Warnf(msg string, args ...interface{})
- type Field
- type Level
- type Logger
- func (l *Logger) Debug(msg string, fields ...zap.Field)
- func (l *Logger) Debugf(msg string, args ...interface{})
- func (l *Logger) Error(msg string, fields ...Field)
- func (l *Logger) Errorf(msg string, args ...interface{})
- func (l *Logger) Errorw(msg string, keysAndValues ...interface{})
- func (l *Logger) Fatal(msg string, fields ...Field)
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Fatalw(msg string, keysAndValues ...interface{})
- func (l *Logger) Flush()
- func (l *Logger) Info(msg string, fields ...Field)
- func (l *Logger) Infof(msg string, args ...interface{})
- func (l *Logger) Panic(msg string, fields ...Field)
- func (l *Logger) Panicf(format string, v ...interface{})
- func (l *Logger) Panicw(msg string, keysAndValues ...interface{})
- func (l *Logger) Warn(msg string, fields ...Field)
- func (l *Logger) Warnf(msg string, args ...interface{})
- type Option
Constants ¶
View Source
const ( ConsoleFormat = "console" JsonFormat = "json" )
View Source
const ( // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel = zapcore.ErrorLevel // WarnLevel logs are more important than Info, but don't need individual human review WarnLevel = zapcore.WarnLevel // InfoLevel logs are less important than Debug, but are still interesting InfoLevel = zapcore.InfoLevel // DebugLevel logs are for debugging. DebugLevel = zapcore.DebugLevel // DPanicLevel logs are particularly important errors. // In development the zapLogger panics after writing the message. DPanicLevel = zapcore.DPanicLevel // PanicLevel logs a message, then panics. PanicLevel = zapcore.PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel = zapcore.FatalLevel )
Level variables aliases.
Variables ¶
View Source
var ( Any = zap.Any Array = zap.Array Object = zap.Object Binary = zap.Binary Bool = zap.Bool Bools = zap.Bools ByteString = zap.ByteString ByteStrings = zap.ByteStrings Complex64 = zap.Complex64 Complex64s = zap.Complex64s Complex128 = zap.Complex128 Complex128s = zap.Complex128s Duration = zap.Duration Durations = zap.Durations Err = zap.Error Errors = zap.Errors Float32 = zap.Float32 Float32s = zap.Float32s Float64 = zap.Float64 Float64s = zap.Float64s Int = zap.Int Ints = zap.Ints Int8 = zap.Int8 Int8s = zap.Int8s Int16 = zap.Int16 Int16s = zap.Int16s Int32 = zap.Int32 Int32s = zap.Int32s Int64 = zap.Int64 Int64s = zap.Int64s Namespace = zap.Namespace Reflect = zap.Reflect Stack = zap.Stack String = zap.String Stringer = zap.Stringer Strings = zap.Strings Time = zap.Time Times = zap.Times Uint = zap.Uint Uints = zap.Uints Uint8 = zap.Uint8 Uint8s = zap.Uint8s Uint16 = zap.Uint16 Uint16s = zap.Uint16s Uint32 = zap.Uint32 Uint32s = zap.Uint32s Uint64 = zap.Uint64 Uint64s = zap.Uint64s Uintptr = zap.Uintptr Uintptrs = zap.Uintptrs )
Defines the alias for the zap type functions.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.