<?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 = '[AtlasAI Connector] ';
            $ctx = $context ? ' ' . wp_json_encode( $context ) : '';
            // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
            error_log( $tag . $message . $ctx );
        }
    }
}
