WC_Log_Handler_File::log_rotate( string $handle )

Rotate log files.


Description Description

Logs are rotated by prepending ‘.x’ to the ‘.log’ suffix. The current log plus 10 historical logs are maintained. For example: base.9.log -> [ REMOVED ] base.8.log -> base.9.log … base.0.log -> base.1.log base.log -> base.0.log


Parameters Parameters

$handle

(Required) Log handle.


Top ↑

Source Source

File: includes/log-handlers/class-wc-log-handler-file.php

	protected function log_rotate( $handle ) {
		for ( $i = 8; $i >= 0; $i-- ) {
			$this->increment_log_infix( $handle, $i );
		}
		$this->increment_log_infix( $handle );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.