WordPress at Your Fingertips
function is not described

WC_Log_Handler_File::log_rotate() protected WC 1.0

Rotate log files.

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

{} It's a method of the class: WC_Log_Handler_File{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->log_rotate( $handle );
$handle(string) (required)
Log handle.

Code of WC_Log_Handler_File::log_rotate() WC 5.8.0

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