Skip to content
Browse files

The DEBUG token appeared to be clashing with something during error h…

…andler shutdown. renamed it.
  • Loading branch information...
1 parent 8ee228f commit 923657e43dca45d6c4988915430d867af5c5e846 @rikh42 committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 logger/Logger.php
View
12 logger/Logger.php
@@ -11,9 +11,9 @@
class Logger implements LoggerInterface
{
- const DEBUG = 100; // useful to know if you were debugging the app
+ const DEBUG_LOGGER = 100; // useful to know if you were debugging the app (changed to DEBUG_LOGGER to prevent clash with other constants)
const INFO = 200; // Stuff it would be good to know about (eg a login)
- const WARNING = 300; // something stange is going on
+ const WARNING = 300; // something strange is going on
const ERROR = 400; // there was some kind of error
protected $handler;
@@ -79,7 +79,7 @@ public function getHtmlLog()
*/
public function debug($message, $extraData = null)
{
- $this->addRecord(self::DEBUG, $message, $extraData);
+ $this->addRecord(self::DEBUG_LOGGER, $message, $extraData);
}
/**
@@ -129,7 +129,7 @@ public function logMemory($message)
'current' => memory_get_usage(true)
);
- $this->addRecord(self::DEBUG, $message, $data);
+ $this->addRecord(self::DEBUG_LOGGER, $message, $data);
}
/**
@@ -149,7 +149,7 @@ public function logQuery($message, $sql, $args, $queryTime)
'time' => $queryTime
);
- $this->addRecord(self::DEBUG, $message, $data);
+ $this->addRecord(self::DEBUG_LOGGER, $message, $data);
}
/**
@@ -164,6 +164,6 @@ public function logTime($message)
'time' => microtime(true)
);
- $this->addRecord(self::DEBUG, $message, $data);
+ $this->addRecord(self::DEBUG_LOGGER, $message, $data);
}
}

0 comments on commit 923657e

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