nrzap

package
v3.9.1-pre+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

_integrations/nrzap GoDoc

Package nrzap supports https://github.com/uber-go/zap.

import "github.com/newrelic/go-agent/_integrations/nrzap"

For more information, see godocs.

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
cfg := newrelic.NewConfig("Example App", "__YOUR_NEWRELIC_LICENSE_KEY__")

// Create a new zap logger:
z, _ := zap.NewProduction()

// Use nrzap to register the logger with the agent:
cfg.Logger = Transform(z.Named("newrelic"))

newrelic.NewApplication(cfg)
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transform

func Transform(l *zap.Logger) newrelic.Logger

Transform turns a *zap.Logger into a newrelic.Logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL