nrzap

package
v3.15.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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)

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