Documentation
¶
Overview ¶
Package logger provides a minimal structured-logger interface and a default stdlib-based implementation for the poya SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
Debug(msg string, keysAndValues ...any)
Info(msg string, keysAndValues ...any)
Warn(msg string, keysAndValues ...any)
Error(msg string, keysAndValues ...any)
}
Logger is the interface used by the poya SDK for all log output. It follows the idiomatic Go pattern (like zap's sugared logger or klog).
func NewNoop ¶ added in v0.1.14
func NewNoop() Logger
NewNoop returns a Logger that discards every message. Use it to silence SDK logging entirely, the same way github.com/PapaDanielVi/poya/metrics.NoopMetrics disables metrics.
func NewWithHandler ¶
NewWithHandler returns a Logger backed by the given slog.Handler. Useful for tests or custom formatting.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package logrus implements the poya logger.Logger interface on top of github.com/sirupsen/logrus.
|
Package logrus implements the poya logger.Logger interface on top of github.com/sirupsen/logrus. |
|
Package zap implements the poya logger.Logger interface on top of go.uber.org/zap.
|
Package zap implements the poya logger.Logger interface on top of go.uber.org/zap. |
|
Package zerolog implements the poya logger.Logger interface on top of github.com/rs/zerolog.
|
Package zerolog implements the poya logger.Logger interface on top of github.com/rs/zerolog. |
Click to show internal directories.
Click to hide internal directories.