logger

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 1 package

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

View Source
var (
	// DefaultLogger is the base logrus logger. It is different from the logrus
	// default to avoid external dependencies from writing out unexpectedly
	DefaultLogger = InitializeDefaultLogger()
)

Functions

func GetLogLevel added in v0.8.4

func GetLogLevel() logrus.Level

func GetLogger

func GetLogger() logrus.FieldLogger

GetLogger returns the DefaultLogger that was previously setup

func InitializeDefaultLogger

func InitializeDefaultLogger() (logger *logrus.Logger)

InitializeDefaultLogger returns a logrus Logger with a custom text formatter.

func PopulateLogOpts

func PopulateLogOpts(o LogOptions, level string, format string)

PopulateLogOpts populates the logger options making sure that passed values are valid.

func ResetLogOutput

func ResetLogOutput()

func SetLogLevel added in v0.10.0

func SetLogLevel(logLevel logrus.Level)

func SetupLogging

func SetupLogging(o LogOptions, debug bool) error

SetupLogging setup logger options taking into consideration the debug flag.

Types

type LogFormat

type LogFormat string

type LogOptions

type LogOptions map[string]string

LogOptions maps configuration key-value pairs related to logging.

Jump to

Keyboard shortcuts

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