diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index 707968b..fe29e61 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -108,13 +108,15 @@ function error_displayable($error = NULL) {
 /**
  * Logs a PHP error or exception and displays an error page in fatal cases.
  *
- * @param $error
+ * @param array $error
  *   An array with the following keys: %type, !message, %function, %file,
  *   %line, severity_level, and backtrace. All the parameters are plain-text,
  *   with the exception of !message, which needs to be a safe HTML string, and
  *   backtrace, which is a standard PHP backtrace.
- * @param $fatal
- *   TRUE if the error is fatal.
+ * @param bool $fatal
+ *   An error is fatal in case:
+ *     - An exception is thrown and not caught by something else.
+ *     - A recoverable fatal error, which is a fatal error
  */
 function _drupal_log_error($error, $fatal = FALSE) {
   $is_installer = drupal_installation_attempted();
@@ -163,6 +165,12 @@ function _drupal_log_error($error, $fatal = FALSE) {
     }
   }
 
+  // Ensure to log out to error log for fatals, so developers can find the
+  // problems.
+  if ($fatal) {
+    error_log(sprintf('%s: %s in %s on line %d', $error['%type'], $error['!message'], $error['%file'], $error['%line']));
+  }
+
   if (PHP_SAPI === 'cli') {
     if ($fatal) {
       // When called from CLI, simply output a plain text message.
diff --git a/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php b/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php
index e7e8f6c..59683af 100644
--- a/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php
+++ b/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php
@@ -95,6 +95,7 @@ public function testInstalled() {
     else {
       $this->fail('Expected Drupal\Core\Config\UnmetDependenciesException exception thrown');
     }
+    $this->assertErrorLogged('Configuration objects (system.action.user_block_user_action) provided by user have unmet dependencies in');
   }
 
 }
diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install
index 3b13162..b69f531 100644
--- a/core/modules/simpletest/simpletest.install
+++ b/core/modules/simpletest/simpletest.install
@@ -144,7 +144,9 @@ function simpletest_schema() {
       ),
       'file' => array(
         'type' => 'varchar',
-        'length' => 255,
+        // Compiled containers for example can easily result in longer than 255
+        // filepaths.
+        'length' => 1023,
         'not null' => TRUE,
         'default' => '',
         'description' => 'Name of the file where the function is called.',
diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
index 4104b4b..cf0f434 100644
--- a/core/modules/simpletest/src/TestBase.php
+++ b/core/modules/simpletest/src/TestBase.php
@@ -787,6 +787,43 @@ protected function assertNoErrorsLogged() {
   }
 
   /**
+   * Asserts that a specific error have been logged to the PHP error.log.
+   *
+   * @param string $error_message
+   *   The expected error message.
+   *
+   * @return bool
+   *   TRUE if the assertion succeeded, FALSE otherwise.
+   *
+   * @see TestBase::prepareEnvironment()
+   * @see \Drupal\Core\DrupalKernel::bootConfiguration()
+   */
+  protected function assertErrorLogged($error_message) {
+    $error_log_filename = DRUPAL_ROOT . '/' . $this->siteDirectory . '/error.log';
+    if (!file_exists($error_log_filename)) {
+      $this->error('No error logged yet.');
+    }
+
+    $content = file_get_contents($error_log_filename);
+    debug($content);
+    $rows = explode("\n", $content);
+
+    // We iterate over the rows in order to be able to remove the logged error
+    // afterwards.
+    $found = FALSE;
+    foreach ($rows as $row_index => $row) {
+      if (strpos($content, $error_message) !== FALSE) {
+        $found = TRUE;
+        unset($rows[$row_index]);
+      }
+    }
+
+    file_put_contents($error_log_filename, implode("\n", $rows));
+
+    return $this->assertTrue($found, sprintf('The %s error message was logged.', $error_message));
+  }
+
+  /**
    * Fire an assertion that is always positive.
    *
    * @param $message
diff --git a/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
index e985f28..9110fb5 100644
--- a/core/modules/system/src/Tests/System/ErrorHandlerTest.php
+++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
@@ -94,6 +94,7 @@ function testErrorHandler() {
     $this->assertErrorMessage($error_warning);
     $this->assertErrorMessage($error_user_notice);
     $this->assertNoRaw('<pre class="backtrace">', 'Did not find pre element with backtrace class.');
+    $this->assertErrorLogged($fatal_error['!message']);
 
     // Set error reporting to not collect notices.
     $config->set('error_level', ERROR_REPORTING_DISPLAY_SOME)->save();
diff --git a/core/modules/system/src/Tests/System/UncaughtExceptionTest.php b/core/modules/system/src/Tests/System/UncaughtExceptionTest.php
index 02f0a82..616e75b 100644
--- a/core/modules/system/src/Tests/System/UncaughtExceptionTest.php
+++ b/core/modules/system/src/Tests/System/UncaughtExceptionTest.php
@@ -88,6 +88,7 @@ public function testUncaughtException() {
     $this->assertText('The website encountered an unexpected error. Please try again later.');
     $this->assertText($this->expectedExceptionMessage);
     $this->assertExceptionFailure($this->expectedExceptionMessage, 'Ensure that monekys are found in the control room.');
+    $this->assertErrorLogged($this->expectedExceptionMessage);
   }
 
   /**
@@ -100,6 +101,7 @@ public function testMissingDependency() {
     $this->assertRaw('The website encountered an unexpected error.');
     $this->assertRaw($this->expectedExceptionMessage);
     $this->assertExceptionFailure($this->expectedExceptionMessage, 'Ensure that the exception of a missing constructor argument was triggered.');
+    $this->assertErrorLogged($this->expectedExceptionMessage);
   }
 
   /**
@@ -126,6 +128,7 @@ public function testErrorContainer() {
 
     $this->assertRaw($this->expectedExceptionMessage);
     $this->assertExceptionFailure($this->expectedExceptionMessage, 'Ensure that the error of the container was triggered.');
+    $this->assertErrorLogged($this->expectedExceptionMessage);
   }
 
   /**
@@ -154,6 +157,7 @@ public function testExceptionContainer() {
     $this->assertRaw('The website encountered an unexpected error');
     $this->assertRaw($this->expectedExceptionMessage);
     $this->assertExceptionFailure($this->expectedExceptionMessage, 'Ensure that the exception of the container was triggered.');
+    $this->assertErrorLogged($this->expectedExceptionMessage);
   }
 
   /**
@@ -173,6 +177,7 @@ public function testLostDatabaseConnection() {
 
     $this->assertRaw($this->expectedExceptionMessage);
     $this->assertExceptionFailure($this->expectedExceptionMessage, 'Ensure that the access denied DB connection exception is thrown.');
+    $this->assertErrorLogged($this->expectedExceptionMessage);
   }
 
   /**
