Documentation ¶
Overview ¶
Package zap is the package that provides the Zap logger.
Index ¶
- type Params
- type Zap
- func (z *Zap) Close() (err error)
- func (z *Zap) DPanic(msg string, keysAndValues ...any)
- func (z *Zap) Debug(msg string, keysAndValues ...any)
- func (z *Zap) Error(msg string, keysAndValues ...any)
- func (z *Zap) Fatal(msg string, keysAndValues ...any)
- func (z *Zap) Info(msg string, keysAndValues ...any)
- func (z *Zap) Panic(msg string, keysAndValues ...any)
- func (z *Zap) Warn(msg string, keysAndValues ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct { // Path is the path to the log file. Path string // RetainDays is the number of days to retain log files. RetainDays int // RetainCopies is the number of log files to retain. RetainCopies int }
Params defines the parameters for the Zap logger.
type Zap ¶
type Zap struct {
// contains filtered or unexported fields
}
Zap defines an object that performs logging and implements log.Logger.
func (*Zap) DPanic ¶
DPanic logs a message with some additional context. In development mode, the logger then panics.
Click to show internal directories.
Click to hide internal directories.