Documentation
¶
Overview ¶
Package zbark provides a wrapper to make zap.Loggers compatible with the bark.Logger interface.
This package is only of interest to users of github.com/uber-common/bark.
Example ¶
package main
import (
"github.com/uber-go/zap"
"github.com/uber-go/zap/zbark"
)
func main() {
zapLogger := zap.New(zap.NewJSONEncoder(
zap.NoTime(), // discard timestamps in tests
))
// Wrap our structured logger to mimic bark.Logger.
logger := zbark.Barkify(zapLogger)
// The wrapped logger has bark's usual fluent API.
logger.WithField("errors", 0).Infof("%v accepts arbitrary types.", "Bark")
}
Output: {"level":"info","msg":"Bark accepts arbitrary types.","errors":0}
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.