2010年2月24日星期三

Re: [fw-mvc] cant get Fire Php working and more

This doesn't help me.

This messae: $logger->log('This is a log message!', Zend_Log::INFO); doesn't appear in my firePHP.

any idea's?


2010/2/24 Shaun Farrell <farrelley@gmail.com>
You can just throw this into your config.ini

resources.db.params.profiler.enabled = true
resources.db.params.profiler.class = Zend_Db_Profiler_Firebug

Shaun Farrell
Washington, DC
www.farleyhills.com



On Wed, Feb 24, 2010 at 9:58 AM, Jigal sanders <jigalroecha@gmail.com> wrote:
Hello everyone,

I am trying to get logging through firePhP working. 

Here is my code:

protected function _initLogging(){
$this->bootstrap('frontController');
$logger = new Zend_Log();
$writer = 'production' == $this->getEnvironment() ? new Zend_Log_Writer_Stream(APPLICATION_PATH.'/../data/logs/app.log') : new Zend_Log_Writer_Firebug();
var_dump($this->getEnvironment);
$logger->addWriter($writer);
if('production' == $this->getEnvironment()){
$filter = new Zend_Log_Filter_Priority(Zend_Log::CRIT);
$logger->addFilter($filter);
}
$this->_logger = $logger;
$logger->log('This is a log message!', Zend_Log::INFO);
Zend_Registry::set('log', $logger);
}

I have allowed my site in firePHP .
What's also weird is that getEnvironment() returns null. But in my bootstrap file it says:

defined('APPLICATION_ENV')
or define('APPLICATION_ENV', 'development');


I use zend version 1.10.1

Anyona an idea?

Thanks,

J.sanders





--
Met vriendelijke groet,

Jigal Sanders
A.J. Ernststraat 739
1082 LK Amsterdam
Mobiel: 06-42111489

没有评论: