nrzerolog

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

v3/integrations/nrzerolog GoDoc

Package nrzerolog supports https://github.com/rs/zerolog

import "github.com/newrelic/go-agent/v3/integrations/nrzerolog"

For more information, see godocs.

Documentation

Overview

Package nrzerolog supports https://github.com/rs/zerolog

Wrap your zerolog Logger using nrzerolog.Transform to send agent log messages to zerolog.

Example
// Create a new zerolog logger:
zl := zerolog.New(os.Stderr)

newrelic.NewApplication(
	newrelic.ConfigAppName("Example App"),
	newrelic.ConfigLicense("__YOUR_NEWRELIC_LICENSE_KEY__"),
	// Use nrzerolog to register the logger with the agent:
	nrzerolog.ConfigLogger(&zl),
)
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigLogger

func ConfigLogger(l *zerolog.Logger) newrelic.ConfigOption

ConfigLogger configures the newrelic.Application to send log messsages to the provided zerolog logger.

func Transform

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

Transform turns a *zerolog.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