diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php
index ad4f27a6d392bf763e48c63d3eea37093f7290fc..3861b1913001b6b75901c77b813528fa77abfe65 100644
--- a/lib/SimpleSAML/Session.php
+++ b/lib/SimpleSAML/Session.php
@@ -163,6 +163,12 @@ class SimpleSAML_Session {
 		try {
 			self::$instance = self::loadSession();
 		} catch (Exception $e) {
+			if ($e instanceof SimpleSAML_Error_Exception) {
+				SimpleSAML_Logger::error('Error loading session:');
+				$e->logError();
+			} else {
+				SimpleSAML_Logger::error('Error loading session: ' . $e->getMessage());
+			}
 			/* For some reason, we were unable to initialize this session. Use a transient session instead. */
 			self::useTransientSession();
 			return self::$instance;