logger

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug Debug messages from the logger

func DebugF

func DebugF(format string, v ...interface{})

DebugF Debug messages from the logger

func Error

func Error(v ...interface{})

Error Error messages from the logger

func ErrorF

func ErrorF(format string, v ...interface{})

ErrorF Error messages from the logger

func Info

func Info(v ...interface{})

Info Info messages from the logger

func InfoF

func InfoF(format string, v ...interface{})

InfoF Info messages from the logger

func IsValidLogLevel

func IsValidLogLevel(name string) bool

IsValidLogLevel Validates if a log level name is valid

func SetupLogger

func SetupLogger(appLogLevelStr string)

SetupLogger Helps in setting up a log level based on input name

func Warn

func Warn(v ...interface{})

Warn Warning messages from the logger

func WarnF

func WarnF(format string, v ...interface{})

WarnF Warning messages from the logger

Types

type LogLevel

type LogLevel string

LogLevel Type to model log levels used across this app

const (
	// DEBUG Debug messages level
	DEBUG LogLevel = "DEBUG"
	// INFO Information messages to track application state
	INFO LogLevel = "INFO"
	// WARN Recoverable and Ignorable Errors
	WARN LogLevel = "WARN"
	// ERROR Recoverable but needs to be fixed
	ERROR LogLevel = "ERROR"
)

func GetSupportedLogLevels

func GetSupportedLogLevels() []LogLevel

GetSupportedLogLevels Returns log levels followed in this application

Jump to

Keyboard shortcuts

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