4 A [logr](https://github.com/go-logr/logr) implementation using
5 [Zap](go.uber.org/zap).
15 "github.com/go-logr/logr"
16 "github.com/directxman12/zapr"
22 zapLog, err := zap.NewDevelopment()
24 panic(fmt.Sprintf("who watches the watchmen (%v)?", err))
26 log = zapr.NewLogger(zapLog)
28 log.Info("Logr in action!", "the answer", 42)
32 Implementation Details
33 ----------------------
35 For the most part, concepts in Zap correspond directly with those in logr.
37 Unlike Zap, all fields *must* be in the form of suggared fields --
38 it's illegal to pass a strongly-typed Zap field in a key position to any
39 of the logging methods (`Log`, `Error`).
41 Levels in logr correspond to custom debug levels in Zap. Any given level
42 in logr is represents by its inverse in Zap (`zapLevel = -1*logrLevel`).
44 For example `V(2)` is equivalent to log level -2 in Zap, while `V(1)` is
45 equivalent to Zap's `DebugLevel`.