# Functions
AppendToIncomingContext appends zap field to context logger.
Component return a logger with name option base on a logger.
Debug uses fmt.Sprint to construct and log a message.
Debugf uses fmt.Sprintf to log a templated message.
DefaultTimeEncoder serializes time.Time to a human-readable formatted string.
DPanic uses fmt.Sprint to construct and log a message.
DPanicf uses fmt.Sprintf to log a templated message.
Error uses fmt.Sprint to construct and log a message.
Errorf uses fmt.Sprintf to log a templated message.
Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit.
Fatalf uses fmt.Sprintf to log a templated message, then calls os.Exit.
FromIncomingContext returns the logger stored in ctx, if any.
Global return struct logger if you want to use zap style logging.
Info uses fmt.Sprint to construct and log a message.
Infof uses fmt.Sprintf to log a templated message.
No description provided by the author
New create an Instance from zap.
NewCarrier create a new logger carrier.
NewConfig return a Config instance.
NewFromConf create a logger by configuration path "log", it will be set as global logger but run only once.
NewIncomingContext creates a new context with logger carrier.
NewLoggerWithCtx get a logger with context from pool.
NewTextEncoder creates a fast, low-allocation Text encoder.
Panic uses fmt.Sprint to construct and log a message, then panics.
Panicf uses fmt.Sprintf to log a templated message, then panics.
Printf wrapper native log.Printf.
Println wrapper native log.Println.
No description provided by the author
ShortCallerEncoder serializes a caller in file:line format.
Sync calls the underlying Core's Sync method, flushing any buffered log entries.
Warn uses fmt.Sprint to construct and log a message.
Warnf uses fmt.Sprintf to log a templated message.
WithContextLogger returns the logger with context in the ComponentLogger.
WithOriginalLogger returns the original logger in the ComponentLogger.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Config is logger schema ZapConfigs use as zap advance,such as zapcore.NewTee() Sole use as one zap logger core.
DefaultContextLogger is hold a nothing.
FieldCarrier sample to carry context log, the carrier's fields will log by demand.
ComponentLogger is sample and base using for component that also carries a context.Context.
Logger integrate the Uber Zap library to use in woocoo
if you prefer to golang builtin log style,use log.Info or log.Infof, if zap style,you should use log.Operator().Info() if you want to clone Logger,you can call WithOption WithTraceID indicate whether to add trace_id field to the log.
LoggerWithCtx is a wrapper for Logger that also carries a context.Context.
No description provided by the author
Writer is an io.Writer that writes to the provided Zap logger.
# Interfaces
ComponentLogger is sample and base using for component that also carries a context.Context.
ContextLogger is functions to help ContextLogger logging,the functions are called each ComponentLogger call the logging method.
# Type aliases
ComponentLogger is sample and base using for component that also carries a context.Context.