WC_Logger::__construct │ public │ WC 1.0

Constructor for the logger.

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

Хуков нет.

Возвращает

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

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

$WC_Logger = new WC_Logger();
$WC_Logger->__construct( $handlers, $threshold );
$handlers(массив)
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.
По умолчанию: null
$threshold(строка)
Define an explicit threshold. May be configured via WC_LOG_THRESHOLD. By default, all logs will be processed.
По умолчанию: null

Код WC_Logger::__construct() WC 11.2.2

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

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