A simple, colorful logging library for Go โ logs to files and console.
- ๐ File logging with rotation
- ๐ฅ๏ธ Console logging with colors
- ๐ฆ Log levels:
INFO,WARN,ERROR,FATAL - ๐งน Auto cleanup of old logs
- ๐งฉ Module-based console output
import "github.com/Nutdat/logger"logger.Info("App started")
logger.Warn("Low disk space")
logger.Error("DB connection failed")
logger.Fatal("Out of memory")logger.Console("SQL", "SELECT * FROM users")(different color)
logger.LogInit("INIT", "Cache initialized")logger.PrettyPrintJSON(interface)logger.Cleanup(7) // Keep logs from last 7 months