[TYPO3-core] RFC: Resubmission of feature #1585: Logfile by Request URI + configuration of Empty Referer handling + logline hook

Steffen Kamper steffen at sk-typo3.de
Sun Mar 2 19:47:06 CET 2008


Hi Masi,

"Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im 
Newsbeitrag 
news:mailman.1.1204482737.23995.typo3-team-core at lists.netfielders.de...
> Steffen Kamper schrieb:
>> Hi,
>>
>> here is a new patch based on Michael's initial patch which
>> * does syslog entry for all http errors
>
> What is this?
>
> @@ -1417,7 +1419,10 @@
>  * @return void (The function exits!)
>  */
>  function pageErrorHandler($code, $header='', $reason='') {
> -
> + + // generate syslog entry
> + t3lib_div::sysLog($logLine,'cms', SYSLOG_SEVERITY_ERROR);
> + // Issue header in any case:
>  if ($header) {
>  $headerArr = preg_split('/\r|\n/',$header,-1,PREG_SPLIT_NO_EMPTY);
>
>
> It looks like now the pageErrorHandler logs an empty line. Or where is 
> $logLine initialized.
>
you're right, it was a former patch where i built the logLine and still 
forgot to substitute it with $reason

The reason to log this is simply to have a log for this page-errors. May be 
you don't like and others are happy to see what fails on their site.
I will corrected this in next patch.

> Anyway, I don't think that I want my syslog be flooded with all the page 
> misses. The syslog should IMHO only contain errors triggered by 
> configuration or system failures.
>
> But I'm happy to have a dedicated HTTP error log to accompany my "fake" 
> HTTP access log. Even better when the format is like the Apache's error 
> log format.
>
>> * extend log format for apache
>
> Good.
>
> '.($this->loginUser ? $this->fe_user->user['username'] : 'unknown user');
>
> Why not use a short - instead of the long (and pointless) 'unknown user'
>
i want to clearify that this entry is the user entry, do you like entry with 
"- - " ?

>
>> * introduce SYSLOG_SEVERITY-constants for better reading
>
> I still favour class constants and want to point out that there are 
> hundred of TYPO3 functions that take mode arguments which should/could be 
> constants (class or global). Why bother and change the sysLog modes for 
> 4.2 if we can make it clean for all in 4.3?
>
sure this should be discussed. For me it is much better that having integers 
where noone knows the meaning until they browse the called class to read 
description.
So let hear other opinions to that.

vg  Steffen 




More information about the TYPO3-team-core mailing list