Jake Vanderwerf
2026-09-18 a6413da67a4579866f0fd0323ddb23a7b6b9654a
inc/rest/Rest.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\rest;
use JVBase\inc\managers\ErrorHelper;
use JVBase\integrations\services\Cloudflare;
use JVBase\managers\Cache;
use JVBase\managers\Errors;
@@ -30,6 +31,7 @@
 */
abstract class Rest
{
   use ErrorHelper;
   protected string $namespace = 'jvb/v1';
   protected ?Cache $cache = null;
   protected string $cacheName = '';
@@ -645,24 +647,12 @@
      ]);
      try {
         Errors::getInstance()->log('security_audit', $event, $context, 'info');
         $this->logError($event,'auditLog', $context);
      } catch (Exception $e) {
         error_log("Security Audit: {$event} - " . json_encode($context));
      }
   }
   /**
    * Log errors with proper context
    */
   protected function logError(string $message, array $context = [], string $severity = 'error'): void
   {
      try {
         Errors::getInstance()->log(static::class, $message, $context, $severity);
      } catch (Exception $e) {
         error_log(static::class . " Error: {$message} - " . json_encode($context));
      }
   }
   /************************************************************
   SESSION FINGERPRINT
    ************************************************************/