public function LogRotator::run in File Log 8
Same name and namespace in other branches
- 2.0.x src/LogRotator.php \Drupal\filelog\LogRotator::run()
Check and rotate if necessary.
Parameters
bool $force: Bypass the scheduler and force rotation.
Return value
bool Returns TRUE if the rotation was successful.
Throws
\Drupal\filelog\FileLogException
File
- src/
LogRotator.php, line 109
Class
- LogRotator
- Log rotation cron service.
Namespace
Drupal\filelogCode
public function run($force = FALSE) : bool {
if ($force || $this
->shouldRun($this->time
->getRequestTime())) {
return $this
->rotateFile();
}
return FALSE;
}