logger

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Reset  = "\033[0m"
	Red    = "\033[31m"
	Green  = "\033[32m"
	Yellow = "\033[33m"
	Blue   = "\033[34m"
	Cyan   = "\033[36m"
)
View Source
const All = Parser | Renderer | Detail

Variables

This section is empty.

Functions

func Bold

func Bold(text string) string

func BoldUnderline

func BoldUnderline(text string) string

func Colorize

func Colorize(text, color string) string

func Highlight

func Highlight(source []byte, indexes [][2]int, colorFunc func(string) string) string

func Italic

func Italic(text string) string

func Underline

func Underline(text string) string

Types

type LogLevel

type LogLevel uint8
const (
	None   LogLevel = 0
	Parser LogLevel = 1 << iota
	Renderer
	Detail
)

type Logger

type Logger interface {
	SetLogLevel(level LogLevel)
	Log(level LogLevel, msg string, args ...interface{})
	LogMultiline(level LogLevel, msg string, args ...interface{})
	Enter(level LogLevel, msg string, args ...interface{})
	Exit(level LogLevel, msg string, args ...interface{})
}

func NewLogger

func NewLogger() Logger

Jump to

Keyboard shortcuts

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