Zend Framework default log level

1.6k views Asked by At

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.

1

There are 1 answers

0
streetparade On BEST ANSWER
$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');