Actions
Feature #72583
closedget unified log levels
Start date:
2016-01-08
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
there are two functions for logging: TYPO3\CMS\Core\Utility\GeneralUtility::devLog() and TYPO3\CMS\Core\Utility\GeneralUtility::sysLog()
both have a parameter $severity.
for sysLog() there are constants:
// Severity constants used by \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog() const SYSLOG_SEVERITY_INFO = 0; const SYSLOG_SEVERITY_NOTICE = 1; const SYSLOG_SEVERITY_WARNING = 2; const SYSLOG_SEVERITY_ERROR = 3; const SYSLOG_SEVERITY_FATAL = 4;
devLog() (should) accept the values -1 to 3 as stated in the doc-header:
* @param integer $severity Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message
it would be nice to have unique values and one set of constants like:
// Severity constants used by \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog() // and \TYPO3\CMS\Core\Utility\GeneralUtility::devLog() const LOG_SEVERITY_OK = -1; const LOG_SEVERITY_INFO = 0; const LOG_SEVERITY_NOTICE = 1; const LOG_SEVERITY_WARNING = 2; const LOG_SEVERITY_ERROR = 3; const LOG_SEVERITY_FATAL = 4;
Updated by Markus Klein almost 9 years ago
This should all be replaced by the Logging API!
Updated by Markus Klein about 7 years ago
- Related to Task #82430: Replace GeneralUtility::syslog with Logging API added
Actions