import "github.com/newrelic/go-agent/v3/integrations/nrlogxi"
Package nrlogxi supports https://github.com/mgutz/logxi.
Wrap your logxi Logger using nrlogxi.New to send agent log messages through logxi.
Code:
// Create a new logxi logger: l := log.New("newrelic") l.SetLevel(log.LevelInfo) newrelic.NewApplication( newrelic.ConfigAppName("Example App"), newrelic.ConfigLicense("__YOUR_NEWRELIC_LICENSE_KEY__"), // Use nrlogxi to register the logger with the agent: nrlogxi.ConfigLogger(l), )
func ConfigLogger(l log.Logger) newrelic.ConfigOption
ConfigLogger configures the newrelic.Application to send log messsages to the provided logxi logger.
New returns a newrelic.Logger which forwards agent log messages to the provided logxi Logger.
Package nrlogxi imports 3 packages (graph). Updated 2020-07-02. Refresh now. Tools for package owners.