log

package
v0.0.0-...-05f81da Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogLevelError specified the log level as: ERROR
	LogLevelError = 1

	// LogLevelWarning specified the log level as: WARNING
	LogLevelWarning = 2

	// LogLevelInfo specified the log level as: INFO
	LogLevelInfo = 3

	// LogLevelDebug specified the log level as: DEBUG
	LogLevelDebug = 4

	// LogLevelVerbose specified the log level as: VERBOSE
	// This is the same as Debug, but without the repeat filtering
	LogLevelVerbose = 5
)

Variables

This section is empty.

Functions

func ArchiveLogFile

func ArchiveLogFile(archiveFile string) error

ArchiveLogFile copies the contents of the log to the given filename

func Debug

func Debug(format string, a ...interface{})

Debug prints a debug log entry with DBG tag

func Error

func Error(format string, a ...interface{})

Error prints an error log entry with ERR tag

func ErrorError

func ErrorError(err error)

ErrorError prints an error log entry with ERR tag, it takes an error instead of format and args, if a TraceableError is provided then we also include the trace information in the error message

func GetCrashInfoMsg

func GetCrashInfoMsg() string

GetCrashInfoMsg returns the crash info message.

func GetLogFileName

func GetLogFileName() string

GetLogFileName ... returns the filename of the current log

func GetPreConfFile

func GetPreConfFile() string

GetPreConfFile ... returns the filename of where to store the pre-configuration file

func Info

func Info(format string, a ...interface{})

Info prints an info log entry with INF tag

func LevelStr

func LevelStr(level int) (string, error)

LevelStr converts level to its text equivalent, if level is invalid an error is returned

func RequestCrashInfo

func RequestCrashInfo()

RequestCrashInfo prints information for the user on how to properly report the crash of the installer and how to gather more information

func SetLogLevel

func SetLogLevel(l int)

SetLogLevel sets the default log level to l

func SetOutputFilename

func SetOutputFilename(logFile string) (*os.File, error)

SetOutputFilename ... sets the default log output to filename instead of stdout/stderr

func Warning

func Warning(format string, a ...interface{})

Warning prints an warning log entry with WRN tag

Types

This section is empty.

Jump to

Keyboard shortcuts

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