Documentation ¶
Index ¶
- Variables
- type AppLogger
- func (l *AppLogger) DPanic(msg string, fields ...Field)
- func (l *AppLogger) Debug(msg string, fields ...Field)
- func (l *AppLogger) Error(msg string, fields ...Field)
- func (l *AppLogger) Fatal(msg string, fields ...Field)
- func (l *AppLogger) Info(msg string, fields ...Field)
- func (l *AppLogger) LogEvent(event fxevent.Event)
- func (l *AppLogger) Panic(msg string, fields ...Field)
- func (l *AppLogger) Warn(msg string, fields ...Field)
- func (l *AppLogger) With(fields ...Field) *zap.Logger
- type Field
- type HttpLogger
- func (l *HttpLogger) DPanic(msg string, fields ...Field)
- func (l *HttpLogger) Debug(msg string, fields ...Field)
- func (l *HttpLogger) Error(msg string, fields ...Field)
- func (l *HttpLogger) Fatal(msg string, fields ...Field)
- func (l *HttpLogger) Info(msg string, fields ...Field)
- func (l *HttpLogger) Panic(msg string, fields ...Field)
- func (l *HttpLogger) Warn(msg string, fields ...Field)
- func (l *HttpLogger) With(fields ...Field) *zap.Logger
- type Level
- type LevelEnablerFunc
- type Logger
- 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 )
View Source
var ( WithCaller = zap.WithCaller WithStack = zap.Stack AddStacktrace = zap.AddStacktrace )
Functions ¶
This section is empty.
Types ¶
type AppLogger ¶
type AppLogger struct {
// contains filtered or unexported fields
}
AppLogger is an application error logs & warnings
func NewAppLogger ¶
type HttpLogger ¶
type HttpLogger struct {
// contains filtered or unexported fields
}
Http Logger is an http request logs Http logger identify request by request id
func NewHttpLogger ¶
func NewHttpLogger() *HttpLogger
func (*HttpLogger) DPanic ¶
func (l *HttpLogger) DPanic(msg string, fields ...Field)
func (*HttpLogger) Debug ¶
func (l *HttpLogger) Debug(msg string, fields ...Field)
func (*HttpLogger) Error ¶
func (l *HttpLogger) Error(msg string, fields ...Field)
func (*HttpLogger) Fatal ¶
func (l *HttpLogger) Fatal(msg string, fields ...Field)
func (*HttpLogger) Info ¶
func (l *HttpLogger) Info(msg string, fields ...Field)
func (*HttpLogger) Panic ¶
func (l *HttpLogger) Panic(msg string, fields ...Field)
func (*HttpLogger) Warn ¶
func (l *HttpLogger) Warn(msg string, fields ...Field)
type Level ¶
Level is a type alias for zapcore.Level
const ( InfoLevel Level = zapcore.InfoLevel // 0, default level WarnLevel Level = zapcore.WarnLevel // 1 ErrorLevel Level = zapcore.ErrorLevel // 2 DPanicLevel Level = zap.DPanicLevel // 3, used in development log // PanicLevel logs a message, then panics PanicLevel Level = zapcore.PanicLevel // 4 // FatalLevel logs a message, then calls os.Exit(1). FatalLevel Level = zapcore.FatalLevel // 5 DebugLevel Level = zapcore.DebugLevel // -1 )
type LevelEnablerFunc ¶
type Logger ¶
type Logger interface { Info(msg string, fields ...Field) Warn(msg string, fields ...Field) Error(msg string, fields ...Field) DPanic(msg string, fields ...Field) Panic(msg string, fields ...Field) Fatal(msg string, fields ...Field) Debug(msg string, fields ...Field) With(fields ...Field) *zap.Logger }
type RotateOptions ¶
type TeeOption ¶
type TeeOption struct { Filename string Ropt RotateOptions Lef LevelEnablerFunc }
Click to show internal directories.
Click to hide internal directories.