WC_Gateway_Paypal::log │ public static │ WC 1.0

Logging method.

Метод класса: WC_Gateway_Paypal{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WC_Gateway_Paypal::log( $message, $level );
$message(строка) (обязательный)
Log message.
$level(строка)
Possible values: emergency|alert|critical|error|warning|notice|info|debug.
По умолчанию: 'info'

Код WC_Gateway_Paypal::log() WC 11.2.1

public static function log( $message, $level = 'info' ) {
	if ( is_null( self::$log_enabled ) ) {
		$settings          = get_option( 'woocommerce_paypal_settings' );
		self::$log_enabled = 'yes' === ( $settings['debug'] ?? 'no' );
	}

	if ( self::$log_enabled ) {
		if ( empty( self::$log ) ) {
			self::$log = wc_get_logger();
		}
		self::$log->log( $level, $message, array( 'source' => self::ID ) );
	}
}