diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index f17b773d8c..32cfc8188f 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -32,6 +32,8 @@
 use Symfony\Component\HttpFoundation\File\Exception\IniSizeFileException;
 use Symfony\Component\HttpFoundation\File\Exception\NoFileException;
 use Symfony\Component\HttpFoundation\File\Exception\PartialFileException;
+use Symfony\Component\HttpFoundation\File\Exception\ExtensionFileException;
+use Symfony\Component\HttpFoundation\File\Exception\NoTmpDirFileException;
 use Symfony\Component\Mime\MimeTypeGuesserInterface;
 
 /**
@@ -940,16 +942,36 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL
           '%file' => $uploaded_file->getFilename(),
           '%maxsize' => format_size(Environment::getUploadMaxSize()),
         ]));
+      \Drupal::logger('file')->error("The file %file could not be saved because it exceeds %filesize, the maximum allowed size for uploads.", [
+          '%file' => $uploaded_file->getFilename(),
+          '%filesize' => format_size(Environment::getUploadMaxSize()),
+        ]);
       $files[$i] = FALSE;
     }
     catch (PartialFileException | NoFileException $e) {
       \Drupal::messenger()->addError(t('The file %file could not be saved because the upload did not complete.', [
           '%file' => $uploaded_file->getFilename(),
         ]));
+      \Drupal::logger('file')->error('The file %file could not be saved because the upload did not complete.', [
+        '%file' => $uploaded_file->getFilename(),
+      ]);
+      $files[$i] = FALSE;
+    }
+    catch (ExtensionFileException $e) {
+      $error_to_log = t('The file %file could not be saved because a PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.', ['%file' => $uploaded_file->getFilename()]);
+      \Drupal::messenger()->addError($error_to_log);
+      \Drupal::logger('file')->error($error_to_log);
+      $files[$i] = FALSE;
+    }
+    catch (NoTmpDirFileException $e) {
+      $error_to_log = t('The file %file could not be saved because the server is missing a temporary folder.', ['%file' => $uploaded_file->getFilename()]);
+      \Drupal::messenger()->addError($error_to_log);
+      \Drupal::logger('file')->error($error_to_log);
       $files[$i] = FALSE;
     }
     catch (SymfonyFileException $e) {
       \Drupal::messenger()->addError(t('The file %file could not be saved. An unknown error has occurred.', ['%file' => $uploaded_file->getFilename()]));
+      \Drupal::logger('file')->error('The file %file could not be saved. An unknown error has occurred.', ['%file' => $uploaded_file->getFilename()]);
       $files[$i] = FALSE;
     }
     catch (FileValidationException $e) {
@@ -970,7 +992,7 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL
     }
     catch (FileWriteException $e) {
       \Drupal::messenger()->addError(t('File upload error. Could not move uploaded file.'));
-      \Drupal::logger('file')->notice('Upload error. Could not move uploaded file %file to destination %destination.', ['%file' => $uploaded_file->getClientOriginalName(), '%destination' => $destination . '/' . $uploaded_file->getClientOriginalName()]);
+      \Drupal::logger('file')->error('Upload error. Could not move uploaded file %file to destination %destination.', ['%file' => $uploaded_file->getClientOriginalName(), '%destination' => $destination . '/' . $uploaded_file->getClientOriginalName()]);
       $files[$i] = FALSE;
     }
     catch (FileException $e) {
diff --git a/core/modules/file/tests/src/Kernel/FileUploadHandlerTest.php b/core/modules/file/tests/src/Kernel/FileUploadHandlerTest.php
index 5c8fb7fb0b..8f809f9d76 100644
--- a/core/modules/file/tests/src/Kernel/FileUploadHandlerTest.php
+++ b/core/modules/file/tests/src/Kernel/FileUploadHandlerTest.php
@@ -4,7 +4,13 @@
 
 use Drupal\Component\Utility\Environment;
 use Drupal\KernelTests\KernelTestBase;
+use Symfony\Component\HttpFoundation\File\Exception\CannotWriteFileException;
+use Symfony\Component\HttpFoundation\File\Exception\ExtensionFileException;
 use Symfony\Component\HttpFoundation\File\Exception\FormSizeFileException;
+use Symfony\Component\HttpFoundation\File\Exception\IniSizeFileException;
+use Symfony\Component\HttpFoundation\File\Exception\NoFileException;
+use Symfony\Component\HttpFoundation\File\Exception\NoTmpDirFileException;
+use Symfony\Component\HttpFoundation\File\Exception\PartialFileException;
 use Symfony\Component\HttpFoundation\File\UploadedFile;
 
 /**
@@ -17,7 +23,7 @@ class FileUploadHandlerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected static $modules = ['file'];
+  protected static $modules = ['dblog', 'file'];
 
   /**
    * The file upload handler under test.
@@ -48,4 +54,77 @@ public function testFileSaveUploadSingleErrorFormSize() {
     $this->fileUploadHandler->handleFileUpload($file_info);
   }
 
+  /**
+   * Tests file upload errors in dblog.
+   *
+   * @dataProvider providerFileSaveUploadSingle
+   */
+  public function testFileSaveUploadErrorLogs($error, $expected_log_message, $exception_class) {
+    $this->installSchema('dblog', ['watchdog']);
+    $file_name = $this->randomMachineName();
+    $file_info = $this->createMock(UploadedFile::class);
+    $file_info->expects($this->once())->method('getError')->willReturn($error);
+    $file_info->expects($this->once())->method('getClientOriginalName')->willReturn($file_name);
+    $this->expectException($exception_class);
+    $this->fileUploadHandler->handleFileUpload($file_info);
+
+    // Check the logged message.
+    $results = \Drupal::database()->select('watchdog', 'w')
+      ->fields('w')
+      ->execute()
+      ->fetchAll();
+    $actual_log_message = $results[0]->message;
+    if ($error == UPLOAD_ERR_INI_SIZE || $error == UPLOAD_ERR_FORM_SIZE) {
+      $upload_size = format_size(Environment::getUploadMaxSize())->render();
+      $expected_log_message = sprintf($expected_log_message, $file_name, $upload_size);
+    }
+    else {
+      $expected_log_message = sprintf($expected_log_message, $file_name);
+    }
+    $this->assertSame($expected_log_message, $actual_log_message);
+  }
+
+  /**
+   * Data provider for testFileSaveUploadSingle.
+   */
+  public function providerFileSaveUploadSingle() {
+    return [
+      'UPLOAD_ERR_INI_SIZE' => [
+        UPLOAD_ERR_INI_SIZE,
+        'The file %s could not be saved because it exceeds %s, the maximum allowed size for uploads.',
+        IniSizeFileException::class,
+      ],
+      'UPLOAD_ERR_FORM_SIZE' => [
+        UPLOAD_ERR_FORM_SIZE,
+        'The file %s could not be saved because it exceeds %s, the maximum allowed size for uploads.',
+        FormSizeFileException::class,
+      ],
+      'UPLOAD_ERR_PARTIAL' => [
+        UPLOAD_ERR_PARTIAL,
+        'The file %s could not be saved because the upload did not complete.',
+        PartialFileException::class,
+      ],
+      'UPLOAD_ERR_NO_FILE' => [
+        UPLOAD_ERR_NO_FILE,
+        'The file %s could not be saved because the upload did not complete.',
+        NoFileException::class,
+      ],
+      'UPLOAD_ERR_NO_TMP_DIR' => [
+        UPLOAD_ERR_NO_TMP_DIR,
+        'The file %s could not be saved because the server is missing a temporary folder.',
+        NoTmpDirFileException::class,
+      ],
+      'UPLOAD_ERR_CANT_WRITE' => [
+        UPLOAD_ERR_CANT_WRITE,
+        'The file %s could not be saved because the server is unable to write to disk.',
+        CannotWriteFileException::class,
+      ],
+      'UPLOAD_ERR_EXTENSION' => [
+        UPLOAD_ERR_EXTENSION,
+        'The file %s could not be saved because a PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.',
+        ExtensionFileException::class,
+      ],
+    ];
+  }
+
 }
