logging

package
v0.0.0-...-318a3d5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Info provides a logger for info messages
	Info *log.Logger
	// Warning provides a logger for warnings
	Warning *log.Logger
	// Error provides a logger for error
	Error *log.Logger
)

Functions

func InitLoggers

func InitLoggers(
	infoHandle io.Writer,
	warningHandle io.Writer,
	errorHandle io.Writer)

InitLoggers initializes the loggers

func PrintLog

func PrintLog(message string, printInLevel LogLevelType)

PrintLog prints the log according to the log level that is set in the flags

Types

type LogLevelType

type LogLevelType int

LogLevelType represents a type for the log levels

const (
	// VerboseLevel logs debug, info, and error log messages
	VerboseLevel LogLevelType = iota
	// InfoLevel logs info and error log messages
	InfoLevel
	// QuietLevel logs error log messages
	QuietLevel
)
var LogLevel LogLevelType

LogLevel specifies the used logging level

Jump to

Keyboard shortcuts

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