]> source.dussan.org Git - nextcloud-server.git/commitdiff
Added $app parameter to logException
authorVincent Petry <pvince81@owncloud.com>
Wed, 23 Oct 2013 11:58:42 +0000 (13:58 +0200)
committerVincent Petry <pvince81@owncloud.com>
Wed, 23 Oct 2013 11:58:42 +0000 (13:58 +0200)
index.php
lib/public/util.php

index ab7333cf0e62593a164e7a7d04ee3d5b0474a765..0a2f15f9f5e74de24e2b5da2d908b8ee62796b00 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -30,7 +30,7 @@ try {
        OC::handleRequest();
 
 } catch (Exception $ex) {
-       \OCP\Util::logException($ex);
+       \OCP\Util::logException('index', $ex);
 
        //show the user a detailed error page
        OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
index 00ef863c24c9fac0bc107a229b8f26f2f79fe00d..ed0622b8d168ea8a34d6eaae78ab9121086bc67a 100644 (file)
@@ -82,19 +82,19 @@ class Util {
         * if DEBUG mode is enabled
         * @param Exception $ex exception to log
         */
-       public static function logException( \Exception $ex ) {
+       public static function logException( $app, \Exception $ex ) {
                $message = $ex->getMessage();
                if ($ex->getCode()) {
                        $message .= ' [' . $ex->getCode() . ']';
                }
-               \OCP\Util::writeLog('index', 'Exception: ' . $message, \OCP\Util::FATAL);
+               \OCP\Util::writeLog($app, 'Exception: ' . $message, \OCP\Util::FATAL);
                if (defined('DEBUG') and DEBUG) {
                        // also log stack trace
                        $stack = explode('#', $ex->getTraceAsString());
                        // first element is empty
                        array_shift($stack);
                        foreach ($stack as $s) {
-                               \OCP\Util::writeLog('index', 'Exception: ' . $s, \OCP\Util::FATAL);
+                               \OCP\Util::writeLog($app, 'Exception: ' . $s, \OCP\Util::FATAL);
                        }
 
                        // include cause
@@ -105,7 +105,7 @@ class Util {
                                if ($ex->getCode()) {
                                        $message .= '[' . $ex->getCode() . '] ';
                                }
-                               \OCP\Util::writeLog('index', 'Exception: ' . $message, \OCP\Util::FATAL);
+                               \OCP\Util::writeLog($app, 'Exception: ' . $message, \OCP\Util::FATAL);
                        }
                }
        }