https://github.com/erhaem/loggi
Yet another simple Go colored logger
https://github.com/erhaem/loggi
go log logger logging
Last synced: 9 months ago
JSON representation
Yet another simple Go colored logger
- Host: GitHub
- URL: https://github.com/erhaem/loggi
- Owner: erhaem
- License: wtfpl
- Created: 2025-09-21T10:36:28.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-21T11:07:50.000Z (9 months ago)
- Last Synced: 2025-09-21T12:24:56.858Z (9 months ago)
- Topics: go, log, logger, logging
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# loggi
Yet another simple Go colored logger. Print logs with colors and timestamp in Go!
## Installation
```bash
go get github.com/erhaem/loggi@latest
```
## Example Usage
```go
package main
import (
"fmt"
"time"
"github.com/erhaem/loggi"
)
func main() {
port := 8000
loggi.Info(fmt.Sprintf("server running on port %d", port))
diskFree := 5
loggi.Warn(fmt.Sprintf("disk space critically low: %d%% remaining", diskFree))
dbErr := fmt.Errorf("timeout after %ds", 30)
loggi.Error(fmt.Sprintf("failed to connect db: %v", dbErr))
query := "SELECT * FROM users WHERE id=42"
duration := 18 * time.Millisecond
loggi.Debug(fmt.Sprintf("query `%s` executed in %v", query, duration))
loggi.Info("all set!")
}
```
## Screenshot

## License
[WTFPL](LICENSE)