addLogger() public static method

Attach new log system
public static addLogger ( string $type, string $logLevel ) : Gpf_Log_LoggerBase
$type string Gpf_Log_LoggerDisplay::TYPE Gpf_Log_LoggerFile::TYPE Gpf_Log_LoggerDatabase::TYPE
$logLevel string Gpf_Log::CRITICAL Gpf_Log::ERROR Gpf_Log::WARNING Gpf_Log::INFO Gpf_Log::DEBUG
return Gpf_Log_LoggerBase
Ejemplo n.º 1
0
 public function getList() {
     try {
         return $this->transactionList->getHtml(10);
     } catch (Exception $e) {
         if (Gpf_Log::isLogToDisplay()) {
             Gpf_Log::critical('Report list, getHtml exception: ' . $e->getMessage());
         } else { 
             Gpf_Log::addLogger(Gpf_Log_LoggerDisplay::TYPE, Gpf_Log::CRITICAL);
             Gpf_Log::critical('Report list, getHtml exception: ' . $e->getMessage());
             Gpf_Log::disableType(Gpf_Log_LoggerDisplay::TYPE);
         }
         throw $e;
     }
 }
Ejemplo n.º 2
0
 protected function initLogger()
 {
     try {
         Gpf_Log::addLogger(Gpf_Log_LoggerDatabase::TYPE, Pap_Logger::getLogLevel());
     } catch (Gpf_Exception $e) {
     }
 }