Documentation ¶
Overview ¶
Package nrzap supports https://github.com/uber-go/zap
Wrap your zap Logger using nrzap.Transform to send agent log messages to zap.
Example ¶
package main import ( "github.com/newrelic/go-agent/v3/integrations/nrzap" "github.com/newrelic/go-agent/v3/newrelic" "go.uber.org/zap" ) func main() { // 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")), ) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigLogger ¶
func ConfigLogger(l *zap.Logger) newrelic.ConfigOption
ConfigLogger configures the newrelic.Application to send log messsages to the provided zap logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.