Index: typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php =================================================================== --- typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php (revision 7928) +++ typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php (working copy) @@ -34,6 +34,13 @@ */ class tx_reports_reports_status_ConfigurationStatus implements tx_reports_StatusProvider { + // 10 MB + protected $deprecationLogFileSizeWarningThreshold = 10485760; + // 100 MB + protected $deprecationLogFileSizeErrorThreshold = 104857600; + + + /** * Determines the Install Tool's status, mainly concerning its protection. * @@ -43,6 +50,7 @@ public function getStatus() { $statuses = array( 'emptyReferenceIndex' => $this->getReferenceIndexStatus(), + 'deprecationLog' => $this->getDeprecationLogStatus() ); if ($this->isMemcachedUsed()) { @@ -64,7 +72,7 @@ $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', 'sys_refindex'); $registry = t3lib_div::makeInstance('t3lib_Registry'); - $lastRefIndexUpdate = $registry->get('core', 'sys_refindex_lastUpdate'); + $lastRefIndexUpdate = $registry->get('core', 'sys_refindex_lastUpdate'); if (!$count && $lastRefIndexUpdate) { $value = $GLOBALS['LANG']->getLL('status_empty'); @@ -179,6 +187,47 @@ ); } + /** + * Provides status information on the deprecation log, whether it's enabled + * and if so whether certain limits in file size are reached. + * + * @return tx_reports_reports_status_Status The deprecation log status. + */ + protected function getDeprecationLogStatus() { + $title = $GLOBALS['LANG']->getLL('status_configuration_DeprecationLog'); + $value = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:disabled'); + $message = ''; + $severity = tx_reports_reports_status_Status::OK; + + if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) { + $value = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:enabled'); + $message = '
' . $GLOBALS['LANG']->getLL('status_configuration_DeprecationLogEnabled') . '
'; + $severity = tx_reports_reports_status_Status::NOTICE; + + $logFile = t3lib_div::getDeprecationLogFileName(); + $logFileSize = file_exists($logFile) ? filesize($logFile) : 0; + + if ($logFileSize > $this->deprecationLogFileSizeWarningThreshold) { + $severity = tx_reports_reports_status_Status::WARNING; + } + + if ($logFileSize > $this->deprecationLogFileSizeErrorThreshold) { + $severity = tx_reports_reports_status_Status::ERROR; + } + + if ($severity > tx_reports_reports_status_Status::OK) { + $message .= '' . sprintf( + $GLOBALS['LANG']->getLL('status_configuration_DeprecationLogSize'), + t3lib_div::formatSize($logFileSize) + ) . '
'; + } + } + + return t3lib_div::makeInstance('tx_reports_reports_status_Status', + $title, $value, $message, $severity + ); + } + } Index: typo3/sysext/reports/reports/locallang.xml =================================================================== --- typo3/sysext/reports/reports/locallang.xml (revision 7928) +++ typo3/sysext/reports/reports/locallang.xml (working copy) @@ -45,6 +45,9 @@ + + + \ No newline at end of file Index: typo3/sysext/lang/locallang_common.xml =================================================================== --- typo3/sysext/lang/locallang_common.xml (revision 7928) +++ typo3/sysext/lang/locallang_common.xml (working copy) @@ -18,12 +18,14 @@ + + Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (revision 7928) +++ t3lib/config_default.php (working copy) @@ -96,7 +96,7 @@ 'phpTimeZone' => '', // String: timezone to force for all date() and mktime() functions. A list of supported values can be found at http://php.net/manual/en/timezones.php. If this is not set, a valid fallback will be searched for by PHP (php.ini's date.timezone setting, server defaults, etc); and if no fallback is found, the value of "UTC" is used instead. 'systemLog' => '', // String, semi-colon separated list: Defines one or more logging methods. Possible methods: file,