[TASK] Remove locking around log files
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Utility / GeneralUtility.php
index 539b362..3519510 100644 (file)
@@ -4928,17 +4928,12 @@ Connection: close
                        $msgLine = ' - ' . $extKey . ': ' . $msg;
                        // Write message to a file
                        if ($type == 'file') {
-                               $lockObject = self::makeInstance('TYPO3\\CMS\\Core\\Locking\\Locker', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']);
-                               /** @var \TYPO3\CMS\Core\Locking\Locker $lockObject */
-                               $lockObject->setEnableLogging(FALSE);
-                               $lockObject->acquire();
                                $file = fopen($destination, 'a');
                                if ($file) {
                                        fwrite($file, date(($dateFormat . ' ' . $timeFormat)) . $msgLine . LF);
                                        fclose($file);
                                        self::fixPermissions($destination);
                                }
-                               $lockObject->release();
                        } elseif ($type == 'mail') {
                                list($to, $from) = explode('/', $destination);
                                if (!self::validEmail($from)) {
@@ -5006,17 +5001,12 @@ Connection: close
                        }
                        // Write a longer message to the deprecation log
                        $destination = self::getDeprecationLogFileName();
-                       $lockObject = self::makeInstance('TYPO3\\CMS\\Core\\Locking\\Locker', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']);
-                       /** @var \TYPO3\CMS\Core\Locking\Locker $lockObject */
-                       $lockObject->setEnableLogging(FALSE);
-                       $lockObject->acquire();
                        $file = @fopen($destination, 'a');
                        if ($file) {
                                @fwrite($file, ($date . $msg . LF));
                                @fclose($file);
                                self::fixPermissions($destination);
                        }
-                       $lockObject->release();
                }
                if (in_array('devlog', $log) !== FALSE) {
                        // Copy message also to the developer log