Fast, lightweight, customizable and structured logger for Go.
go get github.com/savsgio/go-logger/v4
- 1.22.x
- 1.21.x,
- 1.20.x
- 1.19.x
- 1.18.x
- 1.17.x
Level | Code (constant) | Value (str) |
---|---|---|
logger.PRINT | ||
Panic | logger.PANIC | panic / PANIC |
Fatal | logger.FATAL | fatal / FATAL |
Error | logger.ERROR | error / ERROR |
Warning | logger.WARNING | warning / WARNING |
Info | logger.INFO | info / INFO |
Debug | logger.DEBUG | debug / DEBUG |
Trace | logger.TRACE | trace / TRACE |
NOTE: The default level of standard logger is INFO.
- Text
- JSON
- Custom (your own encoder).
NOTE: The default encoder of standard logger is text.
Feel free to contribute it or fork me... 😉