WC_Helper::log()public staticWC 1.0

Log a helper event.

Method of the class: WC_Helper{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Helper::log( $message, $level );
$message(string) (required)
Log message.
$level(string)
Optional.
Default: info, valid levels: emergency|alert|critical|error|warning|notice|info|debug

WC_Helper::log() code WC 9.3.3

public static function log( $message, $level = 'info' ) {
	if ( ! Constants::is_true( 'WP_DEBUG' ) ) {
		return;
	}

	if ( ! isset( self::$log ) ) {
		self::$log = wc_get_logger();
	}

	self::$log->log( $level, $message, array( 'source' => 'helper' ) );
}