Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLogSourcePrefix ¶ added in v1.0.25
FormatLogSourcePrefix renders a fixed-width log source column.
func GetRequestID ¶
GetRequestID retrieves the request ID from the context. Returns empty string if not found.
func SafeDiagnosticForLog ¶ added in v1.0.72
SafeDiagnosticForLog returns a bounded, single-line diagnostic suitable for persistence and ordinary application logs while redacting credential values and URL userinfo.
func SafeErrorDiagnostic ¶ added in v1.0.72
SafeErrorDiagnostic extracts only allowlisted failure signals from an arbitrary error. It never carries the original free-form error text.
func SetupBaseLogger ¶
func SetupBaseLogger()
SetupBaseLogger configures the shared logrus instance. It is safe to call multiple times; initialization happens only once.
Types ¶
type LogFormatter ¶
type LogFormatter struct{}
LogFormatter defines a custom log format for logrus. This formatter adds source, timestamp, level, request ID, and source location to each log entry. Format: [CLIProxyAPIHome] [2025-12-23 20:14:04] [debug] [manager.go:524] | a1b2c3d4 | Use API key sk-9...0RHO for model gpt-5.2