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

Martin Kutschker Martin.Kutschker at blackbox.net
Sat Jan 14 10:18:17 CET 2006


Michael Stucki <michael at typo3.org> writes on 
Sat, 14 Jan 2006 01:17:57 +0100 (MET):

> Hi Martin,
> 
> 
> > The new options are:
> > 
> > $TYPO3_CONF_VARS['SYS']['systemLog'] = <option>[;<option>,...]
> > option = <type>[,<destination>[,<level>]
> > type = <string>
> > destination = <string>[/<string>]
> > level = <int>
> > 
> > file,/path/to/log/file,2
> > mail,user at domain.tld
> > mail,to at domain.tld/from at domain.tld
> > syslog,local1
> > error_log,,3
> 
> I just had a look at your latest and greatest version of this patch:
> 
> There is one line:
> + list($type,$destination) =
> explode(',',$log,3);
> 
> And the next time:
> + list($type,$destination,$level) =
> explode(',',$log,4);
> 
> It seems to me that the first line ignores the 3rd parameter (the
> level). I
> also wonder why you've set the maximum number of elements to 4 in the
> 2nd call?!


I thought it might speed up processing if I it didn't split more items then necessary. But I'll check it again.


> One open point is that the init function is not called yet. I don't
> think that it is a good idea to open the log at every request.
> Therefore I suggest to add a global variable which is not set in the
> beginning.
> 
> At the first call of t3lib_div::sysLog() you simply check for this
> variable and call the init function if this was not done yet...


Good idea.

Masi 



More information about the TYPO3-team-core mailing list