Documentation
¶
Index ¶
- Constants
- Variables
- func Debug(ctx *gin.Context, msg string, fields ...zap.Field)
- func Error(ctx *gin.Context, msg string, fields ...zap.Field)
- func Fatal(ctx *gin.Context, msg string, fields ...zap.Field)
- func GetLogID(ctx *gin.Context) string
- func GetRequestUri(ctx *gin.Context) string
- func Info(ctx *gin.Context, msg string, fields ...zap.Field)
- func InitLog(conf Config) *zap.Logger
- func Panic(ctx *gin.Context, msg string, fields ...zap.Field)
- func Warn(ctx *gin.Context, msg string, fields ...zap.Field)
- type Buffer
- type Config
- type Field
- type Logger
- type Rotator
Constants ¶
View Source
const ContextKeyLogID = "logId"
View Source
const ContextKeyNoLog = "_no_log"
View Source
const ContextKeyUri = "_uri"
View Source
const LogIDHeaderKey = "X_BD_LOGID"
Variables ¶
View Source
var ( Binary = zap.Binary Bool = zap.Bool ByteString = zap.ByteString String = zap.String Strings = zap.Strings Float64 = zap.Float64 Float32 = zap.Float32 Int = zap.Int Int64 = zap.Int64 Int32 = zap.Int32 Int16 = zap.Int16 Int8 = zap.Int8 Uint = zap.Uint Uint64 = zap.Uint64 Uint32 = zap.Uint32 Reflect = zap.Reflect Namespace = zap.Namespace Duration = zap.Duration Object = zap.Object Any = zap.Any Skip = zap.Skip() AddCallerSkip = zap.AddCallerSkip )
View Source
var ZapLogger *zap.Logger
Functions ¶
func GetRequestUri ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.