log

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorize

func Colorize(s string, c int) string

func EnableDebug

func EnableDebug()

func SetOutput

func SetOutput(out io.Writer)

SetOutput sets the output for logging messages.

Types

type Event

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

func Debug

func Debug() *Event

Debug logs a message at info level.

func Error

func Error() *Event

Error logs a message at error level.

func Fatal

func Fatal() *Event

Fatal logs a message at fatal level.

func Info

func Info() *Event

Info logs a message at info level.

func Warn

func Warn() *Event

Info logs a message at info level.

func (*Event) DNS

func (e *Event) DNS(m *dns.Msg) *Event

DNS logs a DNS message.

func (*Event) Err

func (e *Event) Err(err error) *Event

Err logs an error.

func (*Event) Msg

func (e *Event) Msg(tag, msg string)

Msg logs a message with the given tag and message.

func (*Event) Msgf

func (e *Event) Msgf(tag, format string, v ...any)

Msgf logs a message with the given tag and format string.

func (*Event) Str

func (e *Event) Str(key, val string) *Event

Str logs a string with the given key and value.

Jump to

Keyboard shortcuts

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