logger

package
v0.0.0-...-bf3ae02 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func New

func New() *Logger

func NewFunc

func NewFunc(handle func(args ...any)) *Logger

func NewWriter

func NewWriter(out io.Writer) *Logger

func Null

func Null() *Logger

func (*Logger) Group

func (log *Logger) Group(name string) *Logger

Group indicates that all the logs to the returned logger will be part of this group. Only shown groups will be logged.

func (*Logger) Log

func (log *Logger) Log(args ...any) *Logger

func (*Logger) Logf

func (log *Logger) Logf(format string, args ...any) *Logger

func (*Logger) Prefix

func (log *Logger) Prefix(prefix string) *Logger

Prefix will add the given prefix to the end of the prior prefixes such that any logs to the returned logger will have the cumulated prior prefixes.

func (*Logger) Show

func (log *Logger) Show(groups ...string) *Logger

Show indicates which groups will be logged. The receiver is not modified, the returned logger will have the shown groups in it.

Jump to

Keyboard shortcuts

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