summaryrefslogtreecommitdiffstats
path: root/utility
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-13 20:14:00 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-13 20:14:00 +0200
commitf82b818bdb852f63fdb4a431808f37902f4272ff (patch)
tree60e23d0b4b95a5f862661f3ad4fcc8cfa21f076f /utility
parentc9c7b457a09ed3f1899099bba60dad21ff6ad026 (diff)
break all the things!
Diffstat (limited to 'utility')
-rw-r--r--utility/config.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/utility/config.php b/utility/config.php
index fc65339e9..fc7bd788e 100644
--- a/utility/config.php
+++ b/utility/config.php
@@ -13,7 +13,7 @@
namespace OCA\News\Utility;
-use \OCA\News\Core\Logger;
+use \OCP\ILogger;
class Config {
@@ -32,9 +32,10 @@ class Config {
private $proxyUser;
private $proxyPassword;
private $logger;
+ private $loggerParams;
- public function __construct($fileSystem, Logger $logger) {
+ public function __construct($fileSystem, ILogger $logger, $loggerParams) {
$this->fileSystem = $fileSystem;
$this->autoPurgeMinimumInterval = 60;
$this->autoPurgeCount = 200;
@@ -46,6 +47,7 @@ class Config {
$this->proxyPort = 8080;
$this->proxyUser = '';
$this->proxyPassword = '';
+ $this->loggerParams = $loggerParams;
}
public function getProxyPort() {
@@ -150,7 +152,8 @@ class Config {
$configValues = parse_ini_string($content);
if($configValues === false || count($configValues) === 0) {
- $this->logger->log('Configuration invalid. Ignoring values.' , 'warn');
+ $this->logger->warn('Configuration invalid. Ignoring values.',
+ $this->loggerParams);
} else {
foreach($configValues as $key => $value) {
@@ -159,8 +162,8 @@ class Config {
settype($value, $type);
$this->$key = $value;
} else {
- $this->logger->log('Configuration value "' . $key .
- '" does not exist. Ignored value.' , 'warn');
+ $this->logger->warn('Configuration value "' . $key .
+ '" does not exist. Ignored value.' , $this->loggerParams);
}
}