log

package
v0.0.0-...-8d5bda4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdapterScopeName is the default logging scope name for this adapter.
	AdapterScopeName = "newrelic"
)

Variables

This section is empty.

Functions

func Debugf

func Debugf(template string, args ...interface{})

Debugf uses fmt.Sprintf to construct and log a message at debug level.

func Errorf

func Errorf(template string, args ...interface{})

Errorf uses fmt.Sprintf to construct and log a message at error level.

func Fatalf

func Fatalf(template string, args ...interface{})

Fatalf uses fmt.Sprintf to construct and log a message at fatal level.

func HarvesterConfigFunc

func HarvesterConfigFunc() func(*telemetry.Config)

HarvesterConfigFunc returns a configuration function for the telemetry Harvester initialization.

There is not a one-to-one mapping of our/Istio logging levels to the telemetry package. The mapping made here is that error logging is at the ErrorLevel, debug logging is at the InfoLevel, and audit logging is at the DebugLevel.

func Infof

func Infof(template string, args ...interface{})

Infof uses fmt.Sprintf to construct and log a message at info level.

func Levels

func Levels() []string

Levels returns all valid level names.

func SetOutputLevel

func SetOutputLevel(l Level)

SetOutputLevel adjusts the output level associated with the adapter scope.

func SetStackTraceLevel

func SetStackTraceLevel(l Level)

SetStackTraceLevel adjusts the stack tracing level associated with the adapter scope.

func Warnf

func Warnf(template string, args ...interface{})

Warnf uses fmt.Sprintf to construct and log a message at warn level.

Types

type Level

type Level int

Level of logging severity

const (
	// InvalidLevel represents an invalid logging level returned when parsing errors occur.
	InvalidLevel Level = iota

	// DebugLevel signifies all messages with debug level and above should be logged.
	DebugLevel

	// InfoLevel signifies all messages with info level and above should be logged.
	InfoLevel

	// WarnLevel signifies all messages with warn level and above should be logged.
	WarnLevel

	// ErrorLevel signifies all messages with error level and above should be logged.
	ErrorLevel

	// FatalLevel signifies only fatal level messages should be logged.
	FatalLevel

	// NoneLevel signifies no messages be logged.
	NoneLevel
)

func ParseLevel

func ParseLevel(name string) (Level, error)

ParseLevel interprets level name as a Level.

func (Level) String

func (l Level) String() string

String returns Level string representation.

Jump to

Keyboard shortcuts

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