Skip to content
Browse files

Changed status code names

  • Loading branch information...
1 parent e2c2e5b commit 88102fe43c94078485015200b96cf02b037a7f17 Brian Fenton committed Oct 11, 2010
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/KLogger.php
View
16 src/KLogger.php
@@ -34,15 +34,15 @@ class KLogger
/**
* Internal status codes
*/
- const LOG_OPEN = 1;
- const OPEN_FAILED = 2;
- const LOG_CLOSED = 3;
+ const STATUS_LOG_OPEN = 1;
+ const STATUS_OPEN_FAILED = 2;
+ const STATUS_LOG_CLOSED = 3;
/**
* Current status of the log file
* @var integer
*/
- private $_logStatus = self::LOG_CLOSED;
+ private $_logStatus = self::STATUS_LOG_CLOSED;
/**
* Holds messages generated by the class
* @var array
@@ -154,16 +154,16 @@ public function __construct($logDirectory, $priority)
}
if (file_exists($this->_logFile) && !is_writable($this->_logFile)) {
- $this->_logStatus = self::OPEN_FAILED;
+ $this->_logStatus = self::STATUS_OPEN_FAILED;
$this->_messageQueue[] = $this->_messages['writefail'];
return;
}
if (($this->_fileHandle = fopen($this->_logFile, "a"))) {
- $this->_logStatus = self::LOG_OPEN;
+ $this->_logStatus = self::STATUS_LOG_OPEN;
$this->_messageQueue[] = $this->_messages['opensuccess'];
} else {
- $this->_logStatus = self::OPEN_FAILED;
+ $this->_logStatus = self::STATUS_OPEN_FAILED;
$this->_messageQueue[] = $this->_messages['openfail'];
}
}
@@ -255,7 +255,7 @@ public function log($line, $priority)
*/
public function writeFreeFormLine($line)
{
- if ($this->_logStatus == self::LOG_OPEN
+ if ($this->_logStatus == self::STATUS_LOG_OPEN
&& $this->_priority != self::OFF) {
if (fwrite($this->_fileHandle, $line) === false) {
$this->_messageQueue[] = $this->_messages['writefail'];

0 comments on commit 88102fe

Please sign in to comment.
Something went wrong with that request. Please try again.