log

package
v0.0.0-...-0798a42 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UICleanup = func() {}
	BuildInfo string
)

Functions

func Debugf

func Debugf(message string, args ...interface{})

func ErrorLogger

func ErrorLogger() *log.Logger

func Errorf

func Errorf(message string, args ...interface{})

func Infof

func Infof(message string, args ...interface{})

func Init

func Init(file *os.File, level LogLevel)

func PanicHandler

func PanicHandler()

PanicHandler tries to restore the terminal. A stack trace is written to aerc-crash.log and then passed on if a panic occurs.

func Tracef

func Tracef(message string, args ...interface{})

func Warnf

func Warnf(message string, args ...interface{})

Types

type LogLevel

type LogLevel int
const (
	TRACE LogLevel = 5
	DEBUG LogLevel = 10
	INFO  LogLevel = 20
	WARN  LogLevel = 30
	ERROR LogLevel = 40
)

func ParseLevel

func ParseLevel(value string) (LogLevel, error)

type Logger

type Logger interface {
	Tracef(string, ...interface{})
	Debugf(string, ...interface{})
	Infof(string, ...interface{})
	Warnf(string, ...interface{})
	Errorf(string, ...interface{})
}

func NewLogger

func NewLogger(name string, calldepth int) Logger

Jump to

Keyboard shortcuts

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