/** * Initializes the Debugger. * * @todo move the loggers to a DIC instead of statics!!! */ public function __construct() { if (self::$debug_logger === null) { self::$debug_logger = new DocBlox_Core_Log($this->getConfig()->logging->paths->errors); } $this->setDebugger(new DocBlox_Core_Debug(self::$debug_logger)); }
/** * Logs the given to a debug log. * * This method only works if the Log Level is higher than DEBUG. * If anything other than a string is passed than the item is var_dumped and then stored. * If there is no debug logger object than this method will instantiate it. * * @see DocBlock_Abstract::setLogLevel() * @see Zend_Log * @param string|array|object $message * @return void */ protected function debug($message) { if (!self::$debug_logger) { $config = $this->getConfig(); self::$debug_logger = new DocBlox_Core_Log($config->logging->paths->errors); } self::$debug_logger->log($message, DocBlox_Core_Log::DEBUG); }