How to move typo3 syslog errors to a file?


By default, the frontend errors and backend errors are written to the syslog table. Eventually this table may become a huge one, if we have some javascript errors or something like that which gets added to the table each time we view the web page. So it’ll be better and more manageable when the errors are written to a file rather than storing in the database table. The below configuration steps may help us to do so.

Create a log file on root.
Eg : /var/www/html/domain-name/syserror.log

Update the typo3conf/localconf.php with the following configuration (changes can be made via install tool settings):

    $TYPO3_CONF_VARS['SYS']['displayErrors'] = ’0′;
    $TYPO3_CONF_VARS['SYS']['devIPmask'] = ‘*’;
    $TYPO3_CONF_VARS['SYS']['errorHandler'] = ‘t3lib_error_ErrorHandler’;
    $TYPO3_CONF_VARS['SYS']['errorHandlerErrors'] = 6135;
    $TYPO3_CONF_VARS['SYS']['exceptionalErrors'] = 4341;
    $TYPO3_CONF_VARS['SYS']['debugExceptionHandler'] = ‘t3lib_error_DebugExceptionHandler’;
    $TYPO3_CONF_VARS['SYS']['productionExceptionHandler'] = ‘t3lib_error_DebugExceptionHandler’;
    $TYPO3_CONF_VARS['SYS']['systemLogLevel'] = ’0′;
    $TYPO3_CONF_VARS['SYS']['systemLog'] = ‘file,/var/www/html/domain-name/syserror.log,1′;
    //Location of the error log file
    $TYPO3_CONF_VARS['SYS']['enable_errorDLOG'] = ’1′;$TYPO3_CONF_VARS['SYS']['enable_exceptionDLOG'] = ’1′;
    $TYPO3_CONF_VARS['SYS']['belogErrorReporting'] = ’0′;

Modify the .htaccess file.

    php_flag display_errors off
    php_flag log_errors off
    php_value error_log /var/www/html/domain-name/syserror.log
    #Location of the error log file

via How to move typo3 syslog errors to a file?

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s