logger

package
v3.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Error(msg string, context map[string]interface{})
	Warn(msg string, context map[string]interface{})
	Info(msg string, context map[string]interface{})
	Debug(msg string, context map[string]interface{})
	DebugEnabled() bool
}

Logger matches newrelic.Logger to allow implementations to be passed to internal packages.

func New

func New(w io.Writer, doDebug bool) Logger

New creates a basic Logger.

type ShimLogger

type ShimLogger struct {
	// IsDebugEnabled is useful as it allows DebugEnabled code paths to be
	// tested.
	IsDebugEnabled bool
}

ShimLogger implements Logger and does nothing.

func (ShimLogger) Debug

func (s ShimLogger) Debug(string, map[string]interface{})

Debug allows ShimLogger to implement Logger.

func (ShimLogger) DebugEnabled

func (s ShimLogger) DebugEnabled() bool

DebugEnabled allows ShimLogger to implement Logger.

func (ShimLogger) Error

func (s ShimLogger) Error(string, map[string]interface{})

Error allows ShimLogger to implement Logger.

func (ShimLogger) Info

func (s ShimLogger) Info(string, map[string]interface{})

Info allows ShimLogger to implement Logger.

func (ShimLogger) Warn

func (s ShimLogger) Warn(string, map[string]interface{})

Warn allows ShimLogger to implement Logger.

Jump to

Keyboard shortcuts

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