log

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrintError  = color.New(color.FgRed).PrintlnFunc()
	PrintfError = color.New(color.FgRed).PrintfFunc()
	PrintWarn   = color.New(color.FgYellow).PrintlnFunc()
	PrintfWarn  = color.New(color.FgYellow).PrintfFunc()
	PrintInfo   = color.New(color.FgCyan).PrintlnFunc()
	PrintfInfo  = color.New(color.FgCyan).PrintfFunc()
	Yellow      = color.New(color.FgYellow).SprintFunc()
	Red         = color.New(color.FgRed).SprintFunc()
	Blue        = color.New(color.FgBlue).SprintFunc()
	Green       = color.New(color.FgGreen).SprintFunc()
	White       = color.New(color.FgWhite).SprintFunc()
	Magenta     = color.New(color.FgMagenta).SprintFunc()
)

Functions

func Debug

func Debug(msg string, v ...interface{})

func Error

func Error(msg string, v ...interface{})

func Info

func Info(msg string, v ...interface{})

func Warn

func Warn(msg string, v ...interface{})

Types

type Handler added in v0.1.0

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

func New added in v0.1.0

func New(w io.Writer, opts *slog.HandlerOptions) *Handler

func (*Handler) Enabled added in v0.1.0

func (h *Handler) Enabled(ctx context.Context, level slog.Level) bool

func (*Handler) Handle added in v0.1.0

func (h *Handler) Handle(ctx context.Context, r slog.Record) error

func (*Handler) WithAttrs added in v0.1.0

func (h *Handler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*Handler) WithGroup added in v0.1.0

func (h *Handler) WithGroup(name string) slog.Handler

Jump to

Keyboard shortcuts

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