go-agent: github.com/newrelic/go-agent/_integrations/nrlogxi/v1 Index | Examples | Files

package nrlogxi

import "github.com/newrelic/go-agent/_integrations/nrlogxi/v1"

Package nrlogxi supports https://github.com/mgutz/logxi.

Wrap your logxi Logger using nrlogxi.New to send agent log messages through logxi.

Code:

cfg := newrelic.NewConfig("Example App", "__YOUR_NEWRELIC_LICENSE_KEY__")

// Create a new logxi logger:
l := log.New("newrelic")
l.SetLevel(log.LevelInfo)

// Use nrlogxi to register the logger with the agent:
cfg.Logger = nrlogxi.New(l)

newrelic.NewApplication(cfg)

Index

Examples

Package Files

nrlogxi.go

func New Uses

func New(l log.Logger) newrelic.Logger

New returns a newrelic.Logger which forwards agent log messages to the provided logxi Logger.

Package nrlogxi imports 3 packages (graph). Updated 2019-10-24. Refresh now. Tools for package owners.