Logger provides a configurable logging solution with multiple output options, log levels, and rotation capabilities built on top of Go's slog package.
go get github.com/jkaninda/loggerl := logger.New(
WithOutputFile("/var/log/app.log"),
WithCaller(),
WithInfoLevel(),
WithMaxAge(1),
WithMaxSize(100),
WithJSONFormat(),
)
l.Info("Application started", "version", "1.0.0") l := logger.Default()
l.Info("Application started", "version", "1.0.0", "config", "default") logger.New(logger.WithJSONFormat())
logger.Info("Application started", "version", "1.0.0")Contributions are welcome!
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your fork
- Open a Pull Request
⭐ If you find Okapi useful, please consider giving it a star on GitHub!
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright (c) 2025 Jonas Kaninda