Пример #1
0
 /**
  * Constructs a new debug object and attaches it to the log object.
  *
  * This method is private because the getInstance() should be called.
  */
 private function __construct()
 {
     $this->options = new ezcDebugOptions();
     $original = ezcLog::getInstance();
     $this->log = clone $original;
     $this->log->reset();
     $this->log->setMapper(new ezcLogFilterSet());
     // Set the writer.
     $this->writer = new ezcDebugMemoryWriter();
     $filter = new ezcLogFilter();
     $filter->severity = ezcLog::DEBUG;
     $this->log->getMapper()->appendRule(new ezcLogFilterRule($filter, $this->writer, true));
     $this->reset();
 }