Documentation
¶
Overview ¶
Package logging provides the logger interface for XSQS
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log interface {
// Infow logs an informational message with optional key-value pairs.
Infow(msg string, kv ...any)
// Warnw logs a warning message with optional key-value pairs.
Warnw(msg string, kv ...any)
// Errorw logs an error message with optional key-value pairs.
Errorw(msg string, kv ...any)
// With returns a new logger instance with additional key-value pairs.
With(kv ...any) Log
}
Log is the interface for a logger.
func DefaultZapAdapter ¶
func DefaultZapAdapter() Log
DefaultZapAdapter returns a new instance of the ZapAdapter as the default logger.
type ZapAdapter ¶
type ZapAdapter struct {
*zap.SugaredLogger
}
ZapAdapter is an implementation of the Log interface using the Zap logger.
func (ZapAdapter) With ¶
func (log ZapAdapter) With(kv ...any) Log
With returns a new Log instance with additional key-value pairs.
Click to show internal directories.
Click to hide internal directories.