log

package
v0.0.0-...-d07a634 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyLog

type EmptyLog struct{}

func (EmptyLog) Close

func (l EmptyLog) Close() error

func (EmptyLog) Error

func (l EmptyLog) Error(string, ...any)

func (EmptyLog) Info

func (l EmptyLog) Info(string, ...any)

func (EmptyLog) Warning

func (l EmptyLog) Warning(string, ...any)

type Level

type Level int
const (
	Info Level = iota
	Warning
	Error
)

type Logger

type Logger interface {
	Error(format string, v ...any)
	Warning(format string, v ...any)
	Info(format string, v ...any)
	Close() error
}

func New

func New(path string, channel chan Record) Logger

func NewEmptyLog

func NewEmptyLog() Logger

type Record

type Record struct {
	Level Level
	Ts    time.Time
	Msg   string
}

type StdLog

type StdLog struct {
	// contains filtered or unexported fields
}

func (*StdLog) Close

func (l *StdLog) Close() error

func (*StdLog) Error

func (l *StdLog) Error(format string, v ...any)

func (*StdLog) Info

func (l *StdLog) Info(format string, v ...any)

func (*StdLog) Send

func (l *StdLog) Send(entry Record)

func (*StdLog) Warning

func (l *StdLog) Warning(format string, v ...any)

Jump to

Keyboard shortcuts

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