views:

131

answers:

1

Hi

Is it possible to set default log level for entire applicaton? I would like to set it from application.ini. I would like to set loggers to log to database and firephp.

+3  A: 
$logger = new Zend_Log();

$writer = new Zend_Log_Writer_Stream('php://output');
$logger->addWriter($writer);

$filter = new Zend_Log_Filter_Priority(Zend_Log::CRIT);
$logger->addFilter($filter);

// Blocked
$logger->info('Informato Message');

// Logged
$logger->emerg('Emergence Message');
streetparade