debug

package
v0.6.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(projectRoot string, logEnabled, debugEnabled bool)

func End

func End(name string)

End completes a timing block and records it

func IsDebugEnabled

func IsDebugEnabled() bool

func IsEnabled

func IsEnabled() bool

IsEnabled returns true if debug mode is on

func IsLogEnabled

func IsLogEnabled() bool

func Logf

func Logf(format string, args ...any)

Logf logs high-level troubleshooting messages.

func PrintTimings

func PrintTimings()

PrintTimings outputs all timings in human-readable format

func Printf

func Printf(format string, args ...any)

Printf logs debug messages if enabled

func Start

func Start(name string) func()

Start marks the beginning of a timing block; returns a function to call End

Types

type Level

type Level int
const (
	LevelOff Level = iota
	LevelLog
	LevelDebug
)

func (Level) String

func (l Level) String() string

type TimingEntry

type TimingEntry struct {
	Name      string
	Duration  time.Duration
	Timestamp time.Time
}

TimingEntry represents a timed measurement

func Timings

func Timings() []TimingEntry

Timings returns all recorded timings

Jump to

Keyboard shortcuts

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