Documentation
¶
Overview ¶
Package log provides utilities for structured logging in applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface {
Info(string, ...any)
Debug(string, ...any)
Warn(string, ...any)
Error(string, ...any)
}
Logger is an interface that defines methods for structured logging.
func NewPrefixed ¶
NewPrefixed creates a new Logger that prefixes all log messages with the specified prefix.
func NewZerolog ¶
NewZerolog creates a new Logger with the specified log level and writer. Details: https://github.com/rs/zerolog
type Mock ¶
type Mock struct {
Messages []string
}
Mock is a mock logger that collects log messages for testing purposes.
Click to show internal directories.
Click to hide internal directories.