log_error($message) : $addon->log_debug($message); } elseif (function_exists('error_log')) { error_log("ESP INSTANDA [{$level}] {$message}"); } } /** Strip Basic auth headers and password-like values from any string before it is written. */ public static function redact(string $text): string { $text = (string) preg_replace('/(Authorization:\s*Basic\s+)\S+/i', '$1[redacted]', $text); $text = (string) preg_replace('/("?(?:password|pass|pwd)"?\s*[:=]\s*)"?[^",\s}]+/i', '$1[redacted]', $text); return $text; } }