go get command.
Install the package
Run the following command in your project directory:Verify installation
Verify the installation by checking yourgo.mod file:
go.mod
Dependencies
go_logs has minimal dependencies:github.com/fatih/color- ANSI color support for terminal outputgithub.com/slack-go/slack- Slack notifications (optional)
go get.
Go version
go_logs requires Go 1.21 or later. Check your Go version:Update to latest version
Update to the latest version of go_logs:Optional modules
go_logs uses a hybrid architecture with optional modules for advanced features:Async logging
For non-blocking logging with buffered channels:HTTP endpoints
For dynamic log level control via HTTP:Signal handlers
For SIGHUP-based log rotation:OpenTelemetry
For sending logs to OTLP collectors:Hooks
For Slack, syslog, and other integrations:The core package includes all essential features. Optional modules are only needed for specific use cases.
Next steps
Quick start
Learn the basics with a working example
Configuration
Configure go_logs for your environment