log

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

func ClearAll

func ClearAll()

func Critical

func Critical(format interface{}, a ...interface{})

Critical logs a message at a Critical Level

func CriticalF

func CriticalF(format interface{}, a ...interface{})

CriticalF logs a message at Critical level using the same syntax and options as fmt.Printf

func Criticalf

func Criticalf(format interface{}, a ...interface{})

CriticalF logs a message at Critical level using the same syntax and options as fmt.Printf

func Debug

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

Debug logs a message at Debug level

func DebugF

func DebugF(format interface{}, a ...interface{})

DebugF logs a message at Debug level using the same syntax and options as fmt.Printf

func Debugf

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

DebugF logs a message at Debug level using the same syntax and options as fmt.Printf

func Error

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

Error logs a message at Error level

func ErrorF

func ErrorF(format interface{}, a ...interface{})

ErrorF logs a message at Error level using the same syntax and options as fmt.Printf

func Errorf

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

ErrorF logs a message at Error level using the same syntax and options as fmt.Printf

func Fatal

func Fatal(format interface{}, a ...interface{})

Fatal is just like func l.Critical logger except that it is followed by exit to program

func FatalF

func FatalF(format interface{}, a ...interface{})

FatalF is just like func l.CriticalF logger except that it is followed by exit to program

func Fatalf

func Fatalf(format interface{}, a ...interface{})

FatalF is just like func l.CriticalF logger except that it is followed by exit to program

func Info

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

Info logs a message at Info level

func InfoF

func InfoF(format interface{}, a ...interface{})

InfoF logs a message at Info level using the same syntax and options as fmt.Printf

func Infof

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

InfoF logs a message at Info level using the same syntax and options as fmt.Printf

func Notice

func Notice(format interface{}, a ...interface{})

Notice logs a message at Notice level

func NoticeF

func NoticeF(format interface{}, a ...interface{})

NoticeF logs a message at Notice level using the same syntax and options as fmt.Printf

func Noticef

func Noticef(format interface{}, a ...interface{})

NoticeF logs a message at Notice level using the same syntax and options as fmt.Printf

func Panic

func Panic(format interface{}, a ...interface{})

Panic is just like func l.Critical except that it is followed by a call to panic

func PanicF

func PanicF(format interface{}, a ...interface{})

PanicF is just like func l.CriticalF except that it is followed by a call to panic

func Panicf

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

PanicF is just like func l.CriticalF except that it is followed by a call to panic

func Read

func Read(lines int, level Level)

func Register

func Register(logSettings *Logger)

func Rotate

func Rotate()

func SetSettings

func SetSettings(logSettings *Logger)

func Warning

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

Warning logs a message at Warning level

func WarningF

func WarningF(format interface{}, a ...interface{})

WarningF logs a message at Warning level using the same syntax and options as fmt.Printf

func Warningf

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

WarningF logs a message at Warning level using the same syntax and options as fmt.Printf

Types

type Level

type Level int

LogLevel type

const (
	CriticalLevel Level = iota + 1
	ErrorLevel
	WarningLevel
	NoticeLevel
	InfoLevel
	DebugLevel
)

func ParseLevel

func ParseLevel(expr string) Level

type Logger

type Logger struct {
	WriteToFile bool
	Concurrent  bool
	Level       Level
	MaxSize     int
	MaxAge      int
	Path        string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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