import "github.com/newrelic/go-agent/v3/integrations/nrzap"
Package nrzap supports https://github.com/uber-go/zap
Wrap your zap Logger using nrzap.Transform to send agent log messages to zap.
Code:
// Create a new zap logger: z, _ := zap.NewProduction() newrelic.NewApplication( newrelic.ConfigAppName("Example App"), newrelic.ConfigLicense("__YOUR_NEWRELIC_LICENSE_KEY__"), // Use nrzap to register the logger with the agent: nrzap.ConfigLogger(z.Named("newrelic")), )
func ConfigLogger(l *zap.Logger) newrelic.ConfigOption
ConfigLogger configures the newrelic.Application to send log messsages to the provided zap logger.
Transform turns a *zap.Logger into a newrelic.Logger.
Package nrzap imports 3 packages (graph) and is imported by 1 packages. Updated 2020-10-20. Refresh now. Tools for package owners.