Пример #1
0
 /**
  * Log a message
  *
  * @param string $message  Message
  * @param string $severity EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG
  * @param string $category Category
  */
 public function logText($message, $severity = 'ALERT', $category = 'stripe')
 {
     $this->setTLogStripe();
     $msg = "{$category}.{$severity}: {$message}";
     $this->log->info($msg);
     // Back to previous state
     $this->getBackToPreviousState();
 }
Пример #2
0
 /**
  * Log a message
  *
  * @param string $message  Message
  * @param string $severity EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG
  * @param string $category Category
  */
 public function logText($message, $severity = 'INFO', $category = 'paypal')
 {
     $this->setTLogPaypal();
     $now = date('Y-m-d h:i:s');
     $msg = "[{$now}] {$category}.{$severity}: {$message}.";
     $this->log->info($msg);
     // Back to previous state
     $this->getBackToPreviousState();
 }
Пример #3
0
 protected function log($level, $message)
 {
     if ($this->usePropel) {
         switch ($level) {
             case 'debug':
                 $this->logger->debug($message);
                 break;
             case 'info':
                 $this->logger->info($message);
                 break;
             case 'notice':
                 $this->logger->notice($message);
                 break;
             case 'warning':
                 $this->logger->warning($message);
                 break;
             case 'error':
                 $this->logger->error($message);
                 break;
             case 'critical':
                 $this->logger->critical($message);
                 break;
         }
     } else {
         $this->logs[] = [$level, $message];
     }
 }