WC_Log_Handler_File::log_rotate()protectedWC 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

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

Хуков нет.

Возвращает

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

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->log_rotate( $handle );
$handle(строка) (обязательный)
Log handle.

Код WC_Log_Handler_File::log_rotate() WC 8.7.0

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