Documentation ¶
Overview ¶
Package logger provides a logging implementation based on uber-go/zap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a darvaza.org/slog.Logger using the given go.uber.org/zap.Config. If cfg is nil, a default console logger will be created with development-friendly settings.
func NewWithThreshold ¶
NewWithThreshold works like New but restricts output to messages at or above the specified level threshold.
Example thresholds:
slog.LevelDebug // Show all messages slog.LevelInfo // Show info and above slog.LevelWarning // Show only warnings and errors
Types ¶
Click to show internal directories.
Click to hide internal directories.