debug

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package debug is where Powertools writes down what it does internally.

It is silent unless POWERTOOLS_DEBUG is on, as Powertools Python's own package logger is.

Index

Constants

This section is empty.

Variables

View Source
var Logger = sync.OnceValue(func() *slog.Logger {
	if !env.IsDebug() {
		return slog.New(slog.DiscardHandler)
	}
	return slog.New(slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: slog.LevelDebug})).
		With("logger", "powertools")
})

Logger returns the internal logger: JSON records on standard error at Debug when POWERTOOLS_DEBUG is on, nothing otherwise.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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