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.NewJSON() // Stub the current time in tests. zapLogger.StubTime() // 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: {"msg":"Bark accepts arbitrary types.","level":"info","ts":0,"fields":{"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.