metadata

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideCallerInfo

func HideCallerInfo(module string, level Level)

HideCallerInfo - Do not show caller info in log lines for given log level and module

func IsCallerInfoEnabled

func IsCallerInfoEnabled(module string, level Level) bool

IsCallerInfoEnabled - returns if caller info enabled for given log level and module

func IsEnabledFor

func IsEnabledFor(module string, level Level) bool

IsEnabledFor - Check if given log level is enabled for given module

func ParseString

func ParseString(level Level) string

ParseString returns string representation of given log level

func SetLevel

func SetLevel(module string, level Level)

SetLevel - setting log level for given module

func ShowCallerInfo

func ShowCallerInfo(module string, level Level)

ShowCallerInfo - Show caller info in log lines for given log level and module

Types

type Level

type Level int

Level defines all available log levels for logging messages.

const (
	CRITICAL Level = iota
	ERROR
	WARNING
	INFO // default logging level
	DEBUG
)

Log levels. note: below constants are copy of 'log.Level' constants added to avoid circular references, care should be taken before changing below constants including their order. For any updates in level constants below, corresponding changes has to be done for constants in 'log.Level'.

func GetLevel

func GetLevel(module string) Level

GetLevel - getting log level for given module

func ParseLevel

func ParseLevel(level string) (Level, error)

ParseLevel returns the log level from a string representation.

Jump to

Keyboard shortcuts

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