debug

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Verbose bool

Functions

func Log

func Log(format string, args ...interface{})

Log prints debug messages when verbose mode is enabled

func LogRequest

func LogRequest(req *http.Request, requestID string)

LogRequest logs HTTP request details in verbose mode IMPORTANT: Authorization header is redacted for security

func LogResponse

func LogResponse(resp *http.Response, requestID string, duration time.Duration)

LogResponse logs HTTP response details in verbose mode. For error responses (4xx/5xx) it also dumps the body — buffering it back onto resp.Body so downstream consumers (retry layer, apierr.ParseAPIError) see the same bytes. Without this, BE bug correlation is blind: we know the status but not which `errorCode` / `message` came back.

Types

This section is empty.

Jump to

Keyboard shortcuts

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