WC_Helper::log()public staticWC 1.0

Log a helper event.

{} It's a method of the class: WC_Helper{}

No Hooks.

Return

null. Nothing.

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

Code of WC_Helper::log() WC 6.6.1

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' ) );
}