<?php


/**
 * WC_Waafi_Logger Class
 * 
 * Handles logging of messages for the Waafi Payment Gateway.
 * Provides a method to log messages to WooCommerce logging system using WooCommerce logger class.
 * 
 * @since 2.0.0
 * @package WooWaafi
 */
class WC_Waafi_Logger
{
    /**
     * Logs a message to WooCommerce logging system.
     * 
     * @param string $message The message to log
     * @param string $level The log level (default: 'info')
     * @since 2.0.0
     */
    public static function log($message, $level = 'info')
    {
        if (defined('WP_DEBUG') && WP_DEBUG) {
            wc_get_logger()->log($level, $message, ['source' => 'waafi-payment']);
        }
    }
}


