<?php

namespace AtlasAiDev\Awfah\Service;

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

class Logger {

    public static function log( string $message, array $context = [] ): void {
        if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
            $tag = '[AI Agent Hub] ';
            $ctx = $context ? ' ' . wp_json_encode( $context ) : '';
            // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
            error_log( $tag . $message . $ctx );
        }
    }
}
