log

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Level Level
	File  *os.File
	Color bool
}

func NewFile

func NewFile(file *os.File, color bool) *File

func (*File) Debug

func (f *File) Debug(format string, p ...any)

func (*File) Error

func (f *File) Error(format string, p ...any)

func (*File) Fatal

func (f *File) Fatal(format string, p ...any)

func (*File) Info

func (f *File) Info(format string, p ...any)

func (*File) Panic

func (f *File) Panic(format string, p ...any)

func (*File) SetLevel

func (f *File) SetLevel(level Level)

func (*File) Warn

func (f *File) Warn(format string, p ...any)

type Level added in v1.0.3

type Level int
const (
	Debug Level = 0
	Info  Level = 1
	Warn  Level = 2
	Error Level = 3
	Fatal Level = 4
	Panic Level = 5
)

type Logger

type Logger interface {
	Debug(format string, p ...any)
	Info(format string, p ...any)
	Warn(format string, p ...any)
	Error(format string, p ...any)
	Fatal(format string, p ...any)
	Panic(format string, p ...any)
	SetLevel(level Level)
}

func NewConsole

func NewConsole(stderr bool, color bool) Logger

func NewLogger added in v1.1.1

func NewLogger(path string, color bool) Logger

Jump to

Keyboard shortcuts

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