Documentation
¶
Overview ¶
Package logging manages application logging using the log/slog package.
This package provides a structured logging facility for applications. It allows the creation of a Logger instance that can log messages at different severity levels such as Debug, Info, Warn, Error, and Fatal. The logging configuration is flexible and supports different output destinations (such as standard output or files) and formats (such as JSON or colored text).
The Logger uses the slog package for structured logging and can be configured to determine the logging output and format based on user-defined settings.
Use the New function to create a Logger instance with specified logging configuration. Various methods are provided to log messages at different severity levels with additional context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger represents an instance of the logging system.
func New ¶
func New(config *config.LoggingConfig) *Logger
New creates a new Logger instance with the specified logging configuration.