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

Holzinger Franz franz at fholzinger.com
Thu Jan 5 21:28:14 CET 2006


Hello Michael,

>I have a third option! Use the syslog() function and let syslogd decide.
>
>Well, all of those solutions would be nice, and it's hard for me to say
>which one is the best solution. Nice that you already added a hook for this
>instead! Bad that you perform the default log operation before checking for
>the hook (IMHO it should simply replace the built-in functionality).
>
>I prefer these solutions in the following order:
>
>1. Write the file manually:
>   Works everywhere just out-of-the box.
>
>2. Call syslog()
>   I can setup syslog to log TYPO3 messages into a separate logfile - no
>   TYPO3 involved, only the facility that needs to be configured through
>   TYPO3_CONF_VARS.
>
>3. Use error_log()
>   In my opinion, error_log() is probably useful for short time debugging,
>   but it is not helpful to be used as a permanent system log because of
>   endless-repeating syntax error reports.
>  
>
I use error_log where I cannot use debug. This can be configured fine
with PHP, so I prefer it in the order 2), 3), 1). I do not know so much
about syslog, but I prefer solutions done by the Operating System,
because you will not have to care that a file does not get too large and
that .ZIP compressed files will be created of it (circulation of 10 files).

>>In config_default.php a default to typo3conf/system.log could be set. An
>>idea for a hook extension is to use syslog() directly or do some fancy
>>custom logging (eg mailing the message).
>>    
>>
>
>Having a default is a very bad solution! Reason: Everyone can check how good
>the site of agency xy or competitor yz is working. Same like access
>statistics that should not be publically viewable.
>  
>
You can prohibit the access to this file via a _.htaccess in this
folder. You can add a random number to the filename after it will be
hard to guess.


Greets,

Franz





More information about the TYPO3-team-core mailing list