[TASK] Raise severity for stale lock file 29/40829/2
authorBernhard Kraft <kraft@webconsulting.at>
Mon, 1 Jun 2015 17:25:27 +0000 (19:25 +0200)
committerBenjamin Mack <benni@typo3.org>
Wed, 1 Jul 2015 14:54:50 +0000 (16:54 +0200)
To make debugging this easier and as a stale lock file really
represents an error in the locking mechanism the severity
being used for logging stale lockfiles should get raised.

This applies to the old locking API only.

Change-Id: I94b91d10411e60bfe944445865f5cb630e988701
Resolves: #67227
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/40829
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/Locking/Locker.php

index 1d30770..7c18482 100644 (file)
@@ -185,7 +185,7 @@ class Locker {
                                        $maxAge = time() - ($maxExecutionTime ?: 120);
                                        if (@filectime($this->resource) < $maxAge) {
                                                @unlink($this->resource);
-                                               $this->sysLog('Unlinking stale lockfile');
+                                               $this->sysLog('Unlinking stale lockfile', GeneralUtility::SYSLOG_SEVERITY_WARNING);
                                        }
                                }
                                for ($i = 0; $i < $this->loops; $i++) {
@@ -259,7 +259,7 @@ class Locker {
                                        $maxAge = time() - ($maxExecutionTime ?: 120);
                                        if (@filectime($this->resource) < $maxAge) {
                                                @unlink($this->resource);
-                                               $this->sysLog('Unlinking stale lockfile');
+                                               $this->sysLog('Unlinking stale lockfile', GeneralUtility::SYSLOG_SEVERITY_WARNING);
                                        }
                                }
                                for ($i = 0; $i < $this->loops; $i++) {
@@ -415,7 +415,7 @@ class Locker {
                                        $maxAge = time() - ($maxExecutionTime ?: 120);
                                        if (@filectime($this->resource) < $maxAge) {
                                                @unlink($this->resource);
-                                               $this->sysLog('Unlinking stale lockfile');
+                                               $this->sysLog('Unlinking stale lockfile', GeneralUtility::SYSLOG_SEVERITY_WARNING);
                                        } else {
                                                $result = TRUE;
                                        }