Actions
Bug #90250
closedMake it possible to entirely turn off deprecation logging via configuration in TYPO3 9.x
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2020-01-29
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
logging, deprecation
Complexity:
Is Regression:
Sprint Focus:
Description
GeneralUtility::deprecationLog() in 9.5 writes deprecation logs to deprecation file which you can't turn off
(1)
public static function deprecationLog($msg)
{
static::writeDeprecationLogFileEntry('GeneralUtility::deprecationLog() will be removed in TYPO3 v10.0, use "trigger_error("Given reason", E_USER_DEPRECATED);" to log deprecations.');
trigger_error($msg, E_USER_DEPRECATED);
}
I don't understand why this function does both: use trigger_error and writeDeprecationLogFileEntry. One would be enough, I guess.
Also, writeDeprecationLogFileEntry() writes directly to a logfile which you can't deactivate - AFAICS.
$destination = Environment::getVarPath() . '/log/deprecation_' . self::shortMD5(Environment::getProjectPath() . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) . '.log';
Some extensions use GeneralUtility::deprecationLog()
(2)
You can turn off (some) deprecation logging via the logging framework (I think)
Actions