protected function _initLogger()
    {
        $this->bootstrap('project');    // Make sure the project object is available
        $logger = \Gems_Log::getLogger();

        $logPath = GEMS_ROOT_DIR . '/var/logs';

        try {
            $writer = new \Zend_Log_Writer_Stream($logPath . '/errors.log');
        } catch (Exception $exc) {
            try {
                // Try to solve the problem, otherwise fail heroically
                \MUtil_File::ensureDir($logPath);
                $writer = new \Zend_Log_Writer_Stream($logPath . '/errors.log');
            } catch (Exception $exc) {
                $this->bootstrap(array('locale', 'translate'));
                die(str_replace(GEMS_ROOT_DIR . '/', '', sprintf(
                        $this->translateAdapter->_('Path %s not writable') . "\n%s\n",
                        $logPath,
                        $exc->getMessage()
                        )));
            }
        }

        $filter = new \Zend_Log_Filter_Priority($this->project->getLogLevel());
        $writer->addFilter($filter);
        $logger->addWriter($writer);

        // OPTIONAL STARTY OF FIREBUG LOGGING.
        if ($this->_startFirebird) {
            $logger->addWriter(new \Zend_Log_Writer_Firebug());
            //We do not add the logLevel here, as the firebug window is intended for use by
            //developers only and it is only written to the active users' own screen.
        }

        \Zend_Registry::set('logger', $logger);

        return $logger;
    }
protected function _initLogger()
    {
        $this->bootstrap('project');    // Make sure the project object is available
        $logger = \Gems_Log::getLogger();

        $logPath = GEMS_ROOT_DIR . '/var/logs';

        try {
            $writer = new \Zend_Log_Writer_Stream($logPath . '/errors.log');
        } catch (Exception $exc) {
            try {
                // Try to solve the problem, otherwise fail heroically
                \MUtil_File::ensureDir($logPath);
                $writer = new \Zend_Log_Writer_Stream($logPath . '/errors.log');
            } catch (Exception $exc) {
                $this->bootstrap(array('locale', 'translate'));
                die(str_replace(GEMS_ROOT_DIR . '/', '', sprintf(
                        $this->translateAdapter->_('Path %s not writable') . "\n%s\n",
                        $logPath,
                        $exc->getMessage()
                        )));
            }
        }

        $filter = new \Zend_Log_Filter_Priority($this->project->getLogLevel());
        $writer->addFilter($filter);
        $logger->addWriter($writer);

        // OPTIONAL STARTY OF FIREBUG LOGGING.
        if ($this->_startFirebird) {
            $logger->addWriter(new \Zend_Log_Writer_Firebug());
            //We do not add the logLevel here, as the firebug window is intended for use by
            //developers only and it is only written to the active users' own screen.
        }

        \Zend_Registry::set('logger', $logger);

        return $logger;
    }
protected function _initLogger ( ) { $ this -> bootstrap ( 'project' ) ; // Make sure the project object is available $ logger = \ Gems_Log :: getLogger ( ) ; $ logPath = GEMS_ROOT_DIR . '/var/logs' ; try { $ writer = new \ Zend_Log_Writer_Stream ( $ logPath . '/errors.log' ) ; } catch ( Exception $ exc ) { try { // Try to solve the problem, otherwise fail heroically \ MUtil_File :: ensureDir ( $ logPath ) ; $ writer = new \ Zend_Log_Writer_Stream ( $ logPath . '/errors.log' ) ; } catch ( Exception $ exc ) { $ this -> bootstrap ( array ( 'locale' , 'translate' ) ) ; die ( str_replace ( GEMS_ROOT_DIR . '/' , '' , sprintf ( $ this -> translateAdapter -> _ ( 'Path %s not writable' ) . "\n%s\n" , $ logPath , $ exc -> getMessage ( ) ) ) ) ; } } $ filter = new \ Zend_Log_Filter_Priority ( $ this -> project -> getLogLevel ( ) ) ; $ writer -> addFilter ( $ filter ) ; $ logger -> addWriter ( $ writer ) ; // OPTIONAL STARTY OF FIREBUG LOGGING. if ( $ this -> _startFirebird ) { $ logger -> addWriter ( new \ Zend_Log_Writer_Firebug ( ) ) ; //We do not add the logLevel here, as the firebug window is intended for use by //developers only and it is only written to the active users' own screen. } \ Zend_Registry :: set ( 'logger' , $ logger ) ; return $ logger ; }
Initialize the logger

@return \Gems_Log
Initialize the logger