diff --git a/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php b/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
index 85b92041009572bbf1f3225634ac0318eefa1f9c..2dd0aee739038378e1af5bf685e540cd97ecd2c1 100644
--- a/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
+++ b/typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
@@ -167,6 +167,7 @@ abstract class AbstractExceptionHandler implements ExceptionHandlerInterface, Si
                 'channel' => SystemLogType::toChannel(SystemLogType::ERROR),
                 'action' => SystemLogGenericAction::UNDEFINED,
                 'error' => SystemLogErrorClassification::SYSTEM_ERROR,
+                'level' => SystemLogType::toLevel(SystemLogType::ERROR),
                 'details_nr' => 0,
                 'details' => str_replace('%', '%%', $logMessage),
                 'log_data' => empty($data) ? '' : serialize($data),
diff --git a/typo3/sysext/core/Classes/Error/ErrorHandler.php b/typo3/sysext/core/Classes/Error/ErrorHandler.php
index 25030f0e0c774d236b02fceb20d6b481d59487ca..a054795b25d24745bec8be9f543c038d4e1273b5 100644
--- a/typo3/sysext/core/Classes/Error/ErrorHandler.php
+++ b/typo3/sysext/core/Classes/Error/ErrorHandler.php
@@ -248,19 +248,6 @@ class ErrorHandler implements ErrorHandlerInterface, LoggerAwareInterface
                 }
             }
 
-            switch ($logLevel) {
-                case LogLevel::ERROR:
-                    $severity = 2;
-                    break;
-                case LogLevel::WARNING:
-                    $severity = 1;
-                    break;
-                case LogLevel::NOTICE:
-                default:
-                    $severity = 0;
-                    break;
-            }
-
             $connection->insert(
                 'sys_log',
                 [
@@ -269,7 +256,7 @@ class ErrorHandler implements ErrorHandlerInterface, LoggerAwareInterface
                     'channel' => SystemLogType::toChannel(SystemLogType::ERROR),
                     'action' => SystemLogGenericAction::UNDEFINED,
                     'error' => SystemLogErrorClassification::SYSTEM_ERROR,
-                    'level' => $severity,
+                    'level' => $logLevel,
                     'details_nr' => 0,
                     'details' => str_replace('%', '%%', $logMessage),
                     'log_data' => empty($data) ? '' : serialize($data),