logger

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug writes log message with defaultLogger.Debug level

func Error

func Error(v ...interface{})

Error writes log message with defaultLogger.Error level

func Info

func Info(v ...interface{})

Info writes log message with defaultLogger.Info level

func SetLogLevel

func SetLogLevel(level instalogger.Level)

SetLogLevel configures the min log level for autoprofile defaultLogger

func SetLogger added in v1.8.0

func SetLogger(l LeveledLogger)

SetLogger sets the leveled logger to use to output the diagnostic messages and errors

func Warn

func Warn(v ...interface{})

Warn writes log message with defaultLogger.Warn level

Types

type Level

type Level uint8

Level is the log level

const (
	ErrorLevel Level = iota
	WarnLevel
	InfoLevel
	DebugLevel
)

Valid log levels compatible with github.com/instana/go-sensor log level values

type LeveledLogger added in v1.8.0

type LeveledLogger interface {
	Debug(v ...interface{})
	Info(v ...interface{})
	Warn(v ...interface{})
	Error(v ...interface{})
}

LeveledLogger is an interface of a generic logger that support different message levels. By default instana.Sensor uses logger.Logger with log.Logger as an output, however this interface is also compatible with such popular loggers as github.com/sirupsen/logrus.Logger and go.uber.org/zap.SugaredLogger

Jump to

Keyboard shortcuts

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