aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-27 22:01:52 +0200
committerBart Visscher <bartv@thisnet.nl>2013-06-27 22:01:52 +0200
commitfb80cbd4997625c2d87457d5ba0b908206474d4d (patch)
treef997ba02ddc467ba851d6a1bad837d2dea966d87
parent2eaad589221a9a189cece52390873f9bd27f113b (diff)
downloadnextcloud-server-fb80cbd4997625c2d87457d5ba0b908206474d4d.tar.gz
nextcloud-server-fb80cbd4997625c2d87457d5ba0b908206474d4d.zip
Fix review points
-rw-r--r--lib/log.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/log.php b/lib/log.php
index 2e26ccad2da..8c157d003cf 100644
--- a/lib/log.php
+++ b/lib/log.php
@@ -19,6 +19,8 @@ namespace OC;
*/
class Log {
+ private $logClass;
+
/**
* System is unusable.
*
@@ -111,8 +113,8 @@ class Log {
}
public function __construct() {
- $this->log_class = 'OC_Log_'.ucfirst(\OC_Config::getValue('log_type', 'owncloud'));
- call_user_func(array($this->log_class, 'init'));
+ $this->logClass = 'OC_Log_'.ucfirst(\OC_Config::getValue('log_type', 'owncloud'));
+ call_user_func(array($this->logClass, 'init'));
}
/**
@@ -122,13 +124,13 @@ class Log {
* @param string $message
* @param array $context
*/
- protected function log($level, $message, array $context = array()) {
+ public function log($level, $message, array $context = array()) {
if (isset($context['app'])) {
$app = $context['app'];
} else {
$app = 'no app in context';
}
- $log_class=$this->log_class;
- $log_class::write($app, $message, $level);
+ $logClass=$this->logClass;
+ $logClass::write($app, $message, $level);
}
}