logging

package
v0.0.0-...-8d8929a Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

func Errorf

func Errorf(format string, a ...interface{}) error

func Infof

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

func Panicf

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

func Printf

func Printf(level Level, format string, a ...interface{})

func SetLogFile

func SetLogFile(filename string)

func SetLogLevel

func SetLogLevel(levelStr string)

func SetLogStderr

func SetLogStderr(enable bool)

func Verbosef

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

func Warningf

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

Types

type Level

type Level uint32

Level type

const (
	PanicLevel Level = iota
	ErrorLevel
	WarningLevel
	InfoLevel
	DebugLevel
	VerboseLevel
	MaxLevel
	UnknownLevel
)

Common use of different level: "panic": Code crash. "error": Unusual event occurred (invalid input or system issue),

so exiting code prematurely.

"warning": Unusual event occurred (invalid input or system issue),

but continuing.

"info": Basic information, indication of major code paths. "debug": Additional information, indication of minor code branches. "verbose": Output of larger variables in code and debug of low level

functions.

func GetLoggingLevel

func GetLoggingLevel(levelStr string) Level

func (Level) String

func (l Level) String() string

Jump to

Keyboard shortcuts

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