[TASK] Convert log levels from string to integer
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Log / Logger.php
index 1c87bbb..6ebaa72 100644 (file)
@@ -172,12 +172,13 @@ class Logger implements \Psr\Log\LoggerInterface {
        /**
         * Adds a log record.
         *
-        * @param integer $level Log level.
+        * @param integer|string $level Log level. Value according to \TYPO3\CMS\Core\Log\LogLevel. Alternatively accepts a string.
         * @param string $message Log message.
         * @param array $data Additional data to log
         * @return mixed
         */
        public function log($level, $message, array $data = array()) {
+               $level = LogLevel::normalizeLevel($level);
                \TYPO3\CMS\Core\Log\LogLevel::validateLevel($level);
                if ($level > $this->minimumLogLevel) {
                        return $this;