Documentation
¶
Overview ¶
Package nrlogxi supports https://github.com/mgutz/logxi.
Wrap your logxi Logger using nrlogxi.New to send agent log messages through logxi.
Example ¶
package main
import (
log "github.com/mgutz/logxi/v1"
nrlogxi "github.com/newrelic/go-agent/v3/integrations/nrlogxi"
newrelic "github.com/newrelic/go-agent/v3/newrelic"
)
func main() {
// 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),
)
}
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigLogger ¶
func ConfigLogger(l log.Logger) newrelic.ConfigOption
ConfigLogger configures the newrelic.Application to send log messsages to the provided logxi logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.