Permalink
Browse files

changed severity to severityThreshold

  • Loading branch information...
1 parent bd099d5 commit 39a42a82bf471b92b210c6a14900e69212c1ff5e Brian Fenton committed Oct 12, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/KLogger.php
View
@@ -57,7 +57,7 @@ class KLogger
* Current minimum logging threshold
* @var integer
*/
- private $_severity = self::INFO;
+ private $_severityThreshold = self::INFO;
/**
* This holds the file handle for this instance's log file
* @var resource
@@ -148,7 +148,7 @@ public function __construct($logDirectory, $severity)
. date('Y-m-d')
. '.txt';
- $this->_severity = $severity;
+ $this->_severityThreshold = $severity;
if (!file_exists($logDirectory)) {
mkdir($logDirectory, self::$_defaultPermissions, true);
}
@@ -268,7 +268,7 @@ public function logFatal($line)
*/
public function log($line, $severity)
{
- if ($this->_severity <= $severity) {
+ if ($this->_severityThreshold <= $severity) {
$status = $this->_getTimeLine($severity);
$this->writeFreeFormLine("$status $line \n");
}
@@ -283,7 +283,7 @@ public function log($line, $severity)
public function writeFreeFormLine($line)
{
if ($this->_logStatus == self::STATUS_LOG_OPEN
- && $this->_severity != self::OFF) {
+ && $this->_severityThreshold != self::OFF) {
if (fwrite($this->_fileHandle, $line) === false) {
$this->_messageQueue[] = $this->_messages['writefail'];
}

0 comments on commit 39a42a8

Please sign in to comment.