[TYPO3-core] RFC: Bug #8182: Fatal error on calling sysLog() of lock object if locking method is unknown

Oliver Hader oliver at typo3.org
Tue Apr 22 17:08:10 CEST 2008


Hi Masi,

Martin Kutschker schrieb:
> Oliver Hader schrieb:
>> This is a SVN patch request.
>>
>> Problem:
>> If the front-end locking is set to an undefined method, e.g. 
>> "semaphoreVerySpecial", normally this should produce an entry in 
>> sysLog. But the $lockObj is not available since an exception was 
>> thrown there.
>>
>> Solution:
>> Use t3lib_div::sysLog() instead.
>>
>> Comments:
>> I'm going to commit this tomorrow (April 22) if nobody objects.
> 
> Ok, but please make it 'Locking: failed to acquire lock:'

Oh, thanks for the hint, 'Locking:' is missing in my patch.

> Masi
> 
> PS: Maybe instead of $lockObj->sysLog('Acquired lock') it could be 
> 'Locking: lock acquired', to use the same message style in all three 
> occurences.

The $lockObj->sysLog() method does the following:
t3lib_div::sysLog('Locking ['.$this->method.'::'.$this->id.']: 
'.trim($message), 'cms', $severity);

The "method" and "id" give some more information about used locking 
method and the resource/file being used.

olly
-- 
Oliver Hader
TYPO3 Core Team


More information about the TYPO3-team-core mailing list