custlog

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package logger is a custom slog.

Index

Constants

View Source
const (
	Reset  = "\033[0m"
	Dim    = "\033[2m"
	Italic = "\033[3m"
	Bold   = "\033[1m"

	// Level Colors
	Blue   = "\033[34m"
	Green  = "\033[32m"
	Yellow = "\033[33m"
	Red    = "\033[31m"
	Gray   = "\033[90m"
)

ANSI Color Constants

Variables

This section is empty.

Functions

func SetupLogger

func SetupLogger()

Types

type TreeHandler

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

func NewTreeHandler

func NewTreeHandler(output io.Writer, opts *slog.HandlerOptions) *TreeHandler

func (*TreeHandler) Enabled

func (h *TreeHandler) Enabled(_ context.Context, level slog.Level) bool

func (*TreeHandler) Handle

func (h *TreeHandler) Handle(_ context.Context, r slog.Record) error

func (*TreeHandler) WithAttrs

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

func (*TreeHandler) WithGroup

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

WithGroup is required for the Interface

Jump to

Keyboard shortcuts

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