Bug #20195
closedlogDeprecatedFunction() significantly slows down TYPO3
0%
Description
The call of logDeprecatedFunction() in t3lib_div significantly slows down the execution of TYPO3. In addition it produces a huge log file in a short period of time (over 300 MB file size in my case). I encountered this problem because I used t3lib_div::makeInstanceClassName() in one of my extensions (t3lib_div::makeInstanceClassName() will become deprecated in 4.3). A profiling session showed that the call of fwrite() in t3lib_div::deprecationLog() was responsible for the slow execution time.
t3lib_div::makeInstanceClassName() to one of your extensions ;-)
(issue imported from #M10707)
Files
Updated by Steffen Müller over 15 years ago
I'd suggest to make this logging feature configurable with
$TYPO3_CONF_VARS['SYS']['depecationLog'], maybe similar to
t3lib_div::syslog).
Possible targets could be:
- don't log at all
- log to file
- log to OS syslogd
- log to php error_log
- log to t3lib_div::devlog
- log to t3lib_div::syslog
Updated by Oliver Hader over 15 years ago
Jochen, thanks for pointing it out.
Of course there shall be a switch in the install tool to disable this logging on productive websites.
Updated by Christian Kuhn over 15 years ago
Attached a patch that implements a new install tool option (default: true)
$TYPO3_CONF_VARS['SYS']['enableDeprecationLogFile']
Updated by Steffen Müller over 15 years ago
Better name it $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] which does chain us to a logging target and is open for future development
Updated by Chris topher about 15 years ago
This is related to #20876 which has been committed.
Satisfying solution?
Updated by Oliver Hader about 15 years ago
The new install tool setting is called "enableDeprecationLog" which is enabled by default.
As already mentioned it was committed to SVN Trunk in issue #20876