logger

package
v0.0.0-...-5db6154 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level string
var (
	LevelMain     Level = "MAIN"
	LevelInfo     Level = "INFO"
	LevelError    Level = "ERROR"
	LevelCritical Level = "CRITICAL"

	LevelToNum = map[Level]int{
		LevelInfo:     0,
		LevelMain:     1,
		LevelError:    2,
		LevelCritical: 3,
	}
)

type Logger

type Logger struct {
	Name      string
	Level     Level
	Separator string

	*log.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(minLevel Level) *Logger

func (*Logger) ChangeLevel

func (l *Logger) ChangeLevel(level Level) *Logger

func (*Logger) ChangeMinima

func (l *Logger) ChangeMinima(minLevel Level) *Logger

func (*Logger) Create

func (l *Logger) Create(name string) *Logger

func (*Logger) Fatalln

func (l *Logger) Fatalln(v ...any)

func (*Logger) Println

func (l *Logger) Println(v ...any)

Jump to

Keyboard shortcuts

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