WC_Logger::__construct()publicWC 1.0

Constructor for the logger.

Method of the class: WC_Logger{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Logger = new WC_Logger();
$WC_Logger->__construct( $handlers, $threshold );
$handlers(array)
Array of log handlers. If $handlers is not provided, the filter woocommerce_register_log_handlers be used to define the handlers. If $handlers is provided, the filter will not be applied and the handlers will be used directly.
Default: null
$threshold(string)
Define an explicit threshold. May be configured via WC_LOG_THRESHOLD. By default, all logs will be processed.
Default: null

WC_Logger::__construct() code WC 8.9.0

public function __construct( $handlers = null, $threshold = null ) {
	if ( is_array( $handlers ) ) {
		$this->handlers = $handlers;
	}

	if ( is_string( $threshold ) ) {
		$this->threshold = $threshold;
	}
}