How to implement level based logging in golang?

Some more suggestions, now that the existing answers are quite old:

  • https://github.com/op/go-logging – smaller than the other here
  • https://github.com/sirupsen/logrus – used in many popular projects such as Docker
  • https://github.com/inconshreveable/log15
  • https://github.com/golang/glog – from Google, implementation of their C++ glog library in Go
  • https://github.com/go-kit/kit/tree/master/log focused on “structured logging” which is better for tools to consume
  • https://github.com/uber-go/zap – “blazing fast”
  • https://github.com/rs/zerolog – zero-allocation JSON logger

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)