critical() public static method

logs critical error message
public static critical ( string $message, string $logGroup = null )
$message string
$logGroup string
Example #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;
     }
 }
Example #2
0
    protected function execute() {

        $select = new Gpf_SqlBuilder_SelectBuilder();
        $select->select->addAll(Pap_Db_Table_RecurringCommissions::getInstance());
        $select->from->add(Pap_Db_Table_RecurringCommissions::getName());

        foreach ($select->getAllRowsIterator() as $row) {
            $recurringCommission = new Pap_Features_RecurringCommissions_RecurringCommission();
            $recurringCommission->fillFromRecord($row);
            $recurringCommission->setPersistent(true);

            if ($this->isDone($recurringCommission->getId())) {
                continue;
            }

            $recurrencePreset = $recurringCommission->getRecurrencePreset();
            $lastCommissionDate = $recurringCommission->getLastCommissionDate();
            if ($lastCommissionDate == null) {
                $lastCommissionDate = $recurringCommission->getTransaction()->getDateInserted();
            }
            $nextTimestamp = $recurrencePreset->getNextDate(Gpf_Common_DateUtils::mysqlDateTime2Timestamp($lastCommissionDate));
            if ($nextTimestamp == null || $nextTimestamp > time()) {
                continue;
            }
            $recurringCommission->setLastCommissionDate(Gpf_Common_DateUtils::getDateTime($nextTimestamp));
            if ($recurringCommission->getStatus() == Pap_Common_Constants::STATUS_APPROVED) {
                try {
                    $recurringCommission->createCommissions();
                } catch (Gpf_Exception $e) {
                    Gpf_Log::critical('Recurring commissions - error create commissions: ' . $e->getMessage());
                    $this->setDone();
                }
            }
            $recurringCommission->save();

            $this->setDone();
        }
    }
Example #3
0
 public static function getCampaignParamName()
 {
     $parameterName = trim(Gpf_Settings::get(Pap_Settings::PARAM_NAME_CAMPAIGN_ID));
     if ($parameterName == '') {
         $mesage = Gpf_Lang::_('Campaign ID parameter name is empty. Review URL parameter name settings');
         Gpf_Log::critical($mesage);
         throw new Gpf_Exception($mesage);
     }
     return $parameterName;
 }
Example #4
0
 protected function notifyTooMuchServerOverloadsInterruptions()
 {
     Gpf_Log::critical('Task runner interrupted due to server overload more than ' . self::MAX_SERVER_OVERLOADED_INTERRUPTIONS_TIMES . ' times!');
 }
 protected function logException()
 {
     Gpf_Log::critical($this->getMessage(), 'Import');
 }
Example #6
0
 protected function dieExit($message)
 {
     Gpf_Log::critical($message, 'TCP');
     die($message);
 }