Project

General

Profile

Actions

Feature #15738

closed

Dynamic log file name

Added by Francois Suter over 18 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2006-02-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
4
Tags:
Complexity:
Sprint Focus:

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

2717_svn_diff.txt (747 Bytes) 2717_svn_diff.txt Administrator Admin, 2006-08-13 12:06
bug_2717.diff (745 Bytes) bug_2717.diff Administrator Admin, 2006-08-13 12:27
Actions #1

Updated by Martin Kutschker over 18 years ago

It probably is possible.

Actions #2

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.

Actions #3

Updated by Michael Stucki over 18 years ago

Moved logfile_dir out of the strftime() call.

Actions #4

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.

Actions #5

Updated by Martin Kutschker almost 18 years ago

Added to SVN.

Actions #6

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.

Actions #7

Updated by Michael Stucki over 17 years ago

I already discovered that last week. Will commit during this week...

Actions #8

Updated by Francois Suter over 17 years ago

Great. Thanks.

Actions #9

Updated by Michael Stucki over 17 years ago

Committed

Actions

Also available in: Atom PDF