WC_Log_Handler_File::__construct
Constructor for the logger.
Method of the class: WC_Log_Handler_File{}
Hooks from the method
Returns
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() WC Log Handler File:: construct code WC 10.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' ) );
}