logger

package
v3.18.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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