WC_Log_Handler_File::__construct()publicWC 1.0

Constructor for the logger.

Method of the class: WC_Log_Handler_File{}

Hooks from the method

Return

null. Nothing (null).

Usage

$WC_Log_Handler_File = new WC_Log_Handler_File();
$WC_Log_Handler_File->__construct( $log_size_limit );
$log_size_limit(int)
Size limit for log files.
Default: 5mb

WC_Log_Handler_File::__construct() code WC 8.7.0

public function __construct( $log_size_limit = null ) {
	if ( null === $log_size_limit ) {
		$log_size_limit = 5 * 1024 * 1024;
	}

	$this->log_size_limit = apply_filters( 'woocommerce_log_file_size_limit', $log_size_limit );

	add_action( 'plugins_loaded', array( $this, 'write_cached_logs' ) );
}