Feature #15738
closedDynamic log file name
0%
Description
Configuring the Typo3 logfile name requires something along the lines of:
config.stat_apache_logfile = typo3.log
Would it be possible to modify class.tslib_fe.php so that strftime() markers can be used, as is common in many software, for example:
config.stat_apache_logfile = typo3_%Y%m%d.log
This would enable a natural log rotation.
(issue imported from #M2717)
Files
Updated by Francois Suter over 18 years ago
I committed the change suggested above in the T3DD06 repository.
In typo3/sysext/cms/tslib/class.tslib_fe.php on line 1770.
The only question is whether we want something more than just strftime() markers. Personnally, I find this fully satisfying.
Updated by Michael Stucki over 18 years ago
Moved logfile_dir out of the strftime() call.
Updated by Francois Suter over 18 years ago
Proposed update to the description of the config.stat_apache_logfile parameter in the TSRef:
This the filename of the logfile in the directory $TYPO3_CONF_VARS["FE"]["logfile_dir"] (localconf) on the server where TYPO3 writes to the apache logfile. The directory defined by $TYPO3_CONF_VARS["FE"]["logfile_dir"] must exist and be writable. It can be relative (to PATH_site) or absolute, but in any case it must be within the regular allowed paths of TYPO3 (meaning for absolute paths that it must be within the “lockRootDir” set up in TYPO3_CONF_VARS).
It is possible to use date markers in the filename, as per the PHP function strftime(). This will enable a natural rotation of the logfiles. For example, typo3_%Y%m%d.log will create daily log files.
Make sure that the web server's user has the rights to write in the logfile directory.
Updated by Francois Suter over 17 years ago
The TSRef has not been updated accordingly. See note with proposed modified description of stat_apache_logfile.
Updated by Michael Stucki over 17 years ago
I already discovered that last week. Will commit during this week...