[TYPO3-core] RFC: error logging for the Core

Martin Kutschker Martin.Kutschker at blackbox.net
Mon Jan 2 16:45:22 CET 2006


Holzinger Franz <franz at fholzinger.com> writes on 
Mon, 02 Jan 2006 16:12:07 +0100 (MET):

> Hello Martin,
> 
> 
> > Severity: 1 is notice, 2 is warning, 3 is fatal error
> 
> I would prefer:
> 
> Severity: 0 is notice, 1 is warning, 2 is small error, 3 is fatal
> error


I think for notice you should use t3lib_devLog, but anyway the numbers are just that - numbers.


> 
> + if (!$file) {
> + die('Cannot open TYPO3 system log: '.$msg);
> + }
> I think this should not die here but only return and maybe send an
> email to the shop admin.


A bit fixed on shops, aren't you? ;-) If we send an email we need another config variable, which I want to avoid. But I prefer the error_log-version anyway.


> > $fakeThis = FALSE;
> 
> why capital letters?


Duno, most of the booleans are set in capitals. I don't like it either, but when in Rome do as the Romans.


> > $msg = ' - '.$extKey.' - '.$severity.' - '.$msg;
> 
> Maybe a new variable $TYPO3_CONF_VARS['SYS']['logFileLevel'] could be
> used to set which level should get logged at all.


Possibly.

Buuuut, which version do you prefer? The one with the fwrite() or the one with the error_log().

And what is your general impression of the patch? +1/-1/neutral...

Masi 



More information about the TYPO3-team-core mailing list