Improve error log formatting and added error message info for InvalidResponseException
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 16 Feb 2012 18:22:09 +0000 (18:22 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 16 Feb 2012 18:22:09 +0000 (18:22 +0000)
includes/filerepo/backend/SwiftFileBackend.php

index e2c5986..734a06a 100644 (file)
@@ -807,7 +807,11 @@ class SwiftFileBackend extends FileBackendStore {
         */
        protected function logException( Exception $e, $func, array $params ) {
                wfDebugLog( 'SwiftBackend',
-                       get_class( $e ) . " in '{$this->name}': '{$func}' with " . serialize( $params ) 
+                       get_class( $e ) . " in '{$func}' (given '" . serialize( $params ) . "')" .
+                       ( $e instanceof InvalidResponseException
+                               ? ": {$e->getMessage()}"
+                               : ""
+                       )
                );
        }
 }