go-mojito / logger-zerolog

zerolog for Mojito provides a zerolog Logger implementation that was designed specifically for Mojito with full compatibility.
MIT License
0 stars 0 forks source link

zerolog for Mojito

PRs Welcome

zerolog for Mojito provides a zerolog Logger implementation that was designed specifically for Mojito with full compatibility.

SonarCloud Report


Quickstart

To start using zerolog as the default logger, simply set it as default like this:

func init() {
    zerolog.AsDefault()
}

Or if you want it as a secondary logger you can register it as a named logger like this:

func init() {
    zerolog.As("myLogger")
}

If you want a more readable, fancy looking log you can enable it by simply adding one line during init:

func init() {
    zerolog.Pretty()
}

Documentation

Read our Documentation, check out the Project Website.

Icon made with Gopherize and flaticon.