$z, "ip" => $ip]) * rather than string-concatenated messages; the UI renders arrays as key/value * pairs which makes filtering and debugging much easier. * * REDACTION EXPECTATION * --------------------- * Callers are responsible for not passing secrets into logs. In particular: * - Never log Authorization/X-API-Key headers * - Never log full request_header info from the Curl class * - Never log the decrypted VirtFusion bearer token or PowerDNS API key * The Curl class deliberately defaults CURLOPT_HEADER to off so header capture * doesn't accidentally populate a field that callers might log. */ class Log { /** Keep this in sync with the WHMCS server module name, so filters work. */ const LOG_MODULE = 'VirtFusionDirect'; /** * Write an entry to the WHMCS module log. * * @param string $action Short tag identifying the operation (used as the "Function" column in the log UI) * @param string|array $requestString Outbound payload or context data. Arrays preferred — rendered as key/value pairs. * @param string|array $responseData Inbound response or result. Same conventions as $requestString. */ public static function insert($action, $requestString, $responseData) { logModuleCall(self::LOG_MODULE, $action, $requestString, $responseData); } }