nrlogxi

package module
v1.0.2-0...-0a94385 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

v3/integrations/nrlogxi GoDoc

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

import "github.com/oldfritter/go-agent/v3/integrations/nrlogxi"

For more information, see godocs.

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/oldfritter/go-agent/v3/integrations/nrlogxi"

	oldfritter "github.com/oldfritter/go-agent/v3/oldfritter"
)

func main() {
	// Create a new logxi logger:
	l := log.New("oldfritter")
	l.SetLevel(log.LevelInfo)

	oldfritter.NewApplication(
		oldfritter.ConfigAppName("Example App"),
		oldfritter.ConfigLicense("__YOUR_NEWRELIC_LICENSE_KEY__"),
		// Use nrlogxi to register the logger with the agent:
		nrlogxi.ConfigLogger(l),
	)
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigLogger

func ConfigLogger(l log.Logger) oldfritter.ConfigOption

ConfigLogger configures the oldfritter.Application to send log messsages to the provided logxi logger.

func New

func New(l log.Logger) oldfritter.Logger

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL