Categorygithub.com/pingcap/log
modulepackage
1.1.0
Repository: https://github.com/pingcap/log.git
Documentation: pkg.go.dev

# README

pingcap/log

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

# Functions

Debug logs a message at DebugLevel.
DefaultTimeEncoder serializes time.Time to a human-readable formatted string.
Error logs a message at ErrorLevel.
Fatal logs a message at FatalLevel.
GetLevel gets the logging level.
Info logs a message at InfoLevel.
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.
NewTextCore creates a Core that writes logs to a WriteSyncer.
NewTextEncoder creates a fast, low-allocation Text encoder.
Panic logs a message at PanicLevel.
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.
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.
ZapProperties records some information about zap.