Esempio n. 1
0
 /**
  * Adds a log record at the EMERGENCY level.
  *
  * This method allows for compatibility with common interfaces.
  *
  * @param  string $message The log message
  * @param  array $context The log context
  * @return bool Whether the record has been processed
  * @throws IoWriteException
  */
 public function emergency($message, array $context = array())
 {
     try {
         return $this->logger->emergency($message, $context);
     } catch (Error $ex) {
         throw new IoWriteException("Record with debug level could not be logged.", $ex);
     } catch (Exception $ex) {
         throw new IoWriteException("Record with debug level could not be logged.", $ex);
     }
 }
 /**
  * Adds a message to the log.
  *
  * @param string message The message to log.
  * @param bool is_debug_msg Indicates if the message should only be logged
  * while debug mode is true.
  */
 protected function log($message, $debug = false)
 {
     LoggerWrapper::log($message, $debug);
 }
Esempio n. 3
0
 function __get($value)
 {
     $logger = new LoggerWrapper('DB');
     $logger->log('WARN', "Tried to get value '{$value}' from row that doesn't exist");
 }