go-agent: github.com/newrelic/go-agent/v3/internal/logger Index | Files

package logger

import "github.com/newrelic/go-agent/v3/internal/logger"

Index

Package Files

logger.go

type Logger Uses

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 Uses

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

New creates a basic Logger.

type ShimLogger Uses

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 Uses

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

Debug allows ShimLogger to implement Logger.

func (ShimLogger) DebugEnabled Uses

func (s ShimLogger) DebugEnabled() bool

DebugEnabled allows ShimLogger to implement Logger.

func (ShimLogger) Error Uses

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

Error allows ShimLogger to implement Logger.

func (ShimLogger) Info Uses

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

Info allows ShimLogger to implement Logger.

func (ShimLogger) Warn Uses

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

Warn allows ShimLogger to implement Logger.

Package logger imports 5 packages (graph) and is imported by 4 packages. Updated 2019-12-02. Refresh now. Tools for package owners.