aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-23 13:58:42 +0200
committerVincent Petry <pvince81@owncloud.com>2013-10-23 13:58:42 +0200
commitc4dee281e693088e445a075d5f59f54e34a1010b (patch)
tree0cec879416a2c2a23c24debecf186270d5cbaad2
parent42c58220def38d5f762dc0c422012b0210577463 (diff)
downloadnextcloud-server-c4dee281e693088e445a075d5f59f54e34a1010b.tar.gz
nextcloud-server-c4dee281e693088e445a075d5f59f54e34a1010b.zip
Added $app parameter to logException
-rwxr-xr-xindex.php2
-rw-r--r--lib/public/util.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/index.php b/index.php
index ab7333cf0e6..0a2f15f9f5e 100755
--- 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);
diff --git a/lib/public/util.php b/lib/public/util.php
index 00ef863c24c..ed0622b8d16 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -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);
}
}
}