package
0.0.0-20241115120902-27964f3632e4
Repository: https://github.com/eviltomorrow/king.git
Documentation: pkg.go.dev

# README

pingcap/log

A wrapper library based on go.uber.org/zap.

# Functions

Debug logs a message at DebugLevel.
No description provided by the author
DefaultTimeEncoder serializes time.Time to a human-readable formatted string.
Error logs a message at ErrorLevel.
No description provided by the author
Fatal logs a message at FatalLevel.
GetLevel gets the logging level.
Info logs a message at InfoLevel.
No description provided by the author
InitLogger initializes a zap logger.
InitLoggerWithWriteSyncer initializes a zap logger with specified write syncer.
No description provided by the author
L returns the global Logger, which can be reconfigured with ReplaceGlobals.
LockWithTimeout wraps a WriteSyncer make it safe for concurrent use, just like zapcore.Lock() timeout seconds.
NewTextCore creates a Core that writes logs to a WriteSyncer.
NewTextEncoder creates a fast, low-allocation Text encoder.
Panic logs a message at PanicLevel.
No description provided by the author
ReplaceGlobals replaces the global Logger and SugaredLogger, and returns a function to restore the original values.
S returns the global SugaredLogger, which can be reconfigured with ReplaceGlobals.
SetLevel alters the logging level.
ShortCallerEncoder serializes a caller in file:line format.
Sync flushes any buffered log entries.
Warn logs a message at WarnLevel.
No description provided by the author
With creates a child logger and adds structured context to it.

# Variables

Get retrieves a buffer from the pool, creating one if necessary.
ZapEncodingName is the encoder name registered in zap.

# Structs

Config serializes log related config in toml/json.
FileLogConfig serializes file log related config in toml/json.
TextIOCore is a copy of zapcore.ioCore that only accept *textEncoder it can be removed after https://github.com/uber-go/zap/pull/685 be merged.
ZapProperties records some information about zap.