Bug #90250
closedMake it possible to entirely turn off deprecation logging via configuration in TYPO3 9.x
100%
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)
Updated by Sybille Peters almost 5 years ago
Ok, I understand, there are 2 deprecations. The original deprecation that was being logged via deprecationLog and the new deprecation log about using deprecationLog() (with the also deprecated writeDeprecationLogFileEntry).
Maybe trigger_error can be used for both?
Updated by Gerrit Code Review almost 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63071
Updated by Sybille Peters almost 5 years ago
- Related to Bug #87960: No way to disable deprecation message logged to file added
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63828
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63071
Updated by Sybille Peters over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1fa44d385008575911d09663026836e680bb1b93.
Updated by Markus Klein over 4 years ago
- Related to Bug #91226: Fix wrong deprecation log calls added