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

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sun Mar 2 19:32:22 CET 2008


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.

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'


> * 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?

Masi


More information about the TYPO3-team-core mailing list