[TASK] Raise severity for stale lock file 71/39871/3
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:21 +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/39871
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/Locking/Locker.php

index d9b2bb2..f897811 100644 (file)
@@ -188,7 +188,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++) {
@@ -262,7 +262,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++) {
@@ -418,7 +418,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;
                                        }