Skip to content

Fast, lightweight, customizable and structured logger for Go.

License

Notifications You must be signed in to change notification settings

savsgio/go-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-logger

Test status Coverage Status Go Report Card GoDev GitHub release

Fast, lightweight, customizable and structured logger for Go.

Install

go get github.com/savsgio/go-logger/v4

Supported Go versions:

  • 1.22.x
  • 1.21.x,
  • 1.20.x
  • 1.19.x
  • 1.18.x
  • 1.17.x

Levels:

Level Code (constant) Value (str)
Print 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.

Encoders:

  • Text
  • JSON
  • Custom (your own encoder).

NOTE: The default encoder of standard logger is text.

Contributing

Feel free to contribute it or fork me... 😉