phpzend-frameworkzend-log

Zend Framework default log level


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.


Solution

  • $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');