Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1443 from owncloud/fix-logger
Browse files Browse the repository at this point in the history
Make Logger independent of ILogger
  • Loading branch information
ChristophWurst committed Apr 22, 2016
2 parents 59ae2ce + e34d49d commit edeca8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/controller/accountscontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
use OCP\Security\ICrypto;

Expand All @@ -63,7 +62,7 @@ class AccountsController extends Controller {
/** @var Folder */
private $userFolder;

/** @var ILogger */
/** @var Logger */
private $logger;

/** @var IL10N */
Expand Down Expand Up @@ -233,7 +232,7 @@ public function create($accountName, $emailAddress, $password,
['data' => ['id' => $newAccount->getId()]],
Http::STATUS_CREATED);
}
} catch (\Exception $ex) {
} catch (Exception $ex) {
$this->logger->error('Creating account failed: ' . $ex->getMessage());
return new JSONResponse(
array('message' => $this->l10n->t('Creating account failed: ') . $ex->getMessage()),
Expand Down
6 changes: 3 additions & 3 deletions lib/service/logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use OCP\ILogger;

class Logger implements ILogger {
class Logger {

/** @var array */
private $context;
Expand Down Expand Up @@ -103,14 +103,14 @@ public function debug($message, array $context = []) {
/**
* @inheritdoc
*/
public function log($level, $message, array $context = array()) {
public function log($level, $message, array $context = []) {
$this->logger->log($level, $message, array_merge($this->context, $context));
}

/**
* @inheritdoc
*/
public function logException(\Exception $exception, array $context = array()) {
public function logException($exception, array $context = []) {
$this->logger->logException($exception, array_merge($this->context, $context));
}

Expand Down

0 comments on commit edeca8a

Please sign in to comment.