LoggerGetting Started
Installation
Install the logger package into your Go project.
The logger package requires Go 1.22 or newer.
logger is a high-performance structured logging package built directly on top of Go’s standard log/slog API.
It extends the standard logging ecosystem with:
- structured JSON logging
- colorized terminal output
- automatic file rotation
- daily log archiving
- context-aware logging
- optimized file writing for production workloads
Install
Install the package using go get:
go get github.com/netlifeguru/loggerAfter installation, import the package into your application:
import "github.com/netlifeguru/logger"The package is built directly on top of Go’s standard log/slog package and does not require any external dependencies.
Once installed, continue with the Quick Start guide to initialize the logger and create your first structured log output.