Log the notification contents

@return void
343854
protected function logNotificationContents ()
    {
        $this->ipnLogFile->writeLine("BillingAgreement @ " . date("Y-m-d H:i:s"));
        $this->ipnLogFile->writeLine(
                "=============================================================================");
        if ($this->notification->isSetBillingAgreement()) {
            $this->ipnLogFile->writeLine("  BillingAgreement");
            $billingAgreement = $this->notification->getBillingAgreement();
            if ($billingAgreement->isSetAmazonBillingAgreementId()) {
                $this->ipnLogFile->writeLine("      AmazonBillingAgreementId");
                $this->ipnLogFile->writeLine(
                        "          " . $billingAgreement->getAmazonBillingAgreementId());
            }
            if ($billingAgreement->isSetSellerBillingAgreementAttributes()) {
                $this->ipnLogFile->writeLine("  SellerBillingAgreementAttributes");
                $sellerBillingAgreementAttributes = $billingAgreement->getSellerBillingAgreementAttributes();
                if ($sellerBillingAgreementAttributes->isSetSellerId()) {
                    $this->ipnLogFile->writeLine("      SellerId");
                    $this->ipnLogFile->writeLine(
                            "          " . $sellerBillingAgreementAttributes->getSellerId());
                }
                if ($sellerBillingAgreementAttributes->isSetSellerBillingAgreementId()) {
                    $this->ipnLogFile->writeLine("      SellerBillingAgreementId");
                    $this->ipnLogFile->writeLine(
                            "          " .
                                     $sellerBillingAgreementAttributes->getSellerBillingAgreementId());
                }
            }
            if ($billingAgreement->isSetBillingAgreementLimits()) {
                $this->ipnLogFile->writeLine("  BillingAgreementLimits");
                $billingAgreementLimits = $billingAgreement->getBillingAgreementLimits();
                if ($billingAgreementLimits->isSetAmountLimitPerTimePeriod()) {
                    $this->ipnLogFile->writeLine("      AmountLimitPerTimePeriod");
                    $amountLimitPerTimePeriod = $billingAgreementLimits->getAmountLimitPerTimePeriod();
                    if ($amountLimitPerTimePeriod->isSetAmount()) {
                        $this->ipnLogFile->writeLine("          Amount");
                        $this->ipnLogFile->writeLine(
                                "              " . $amountLimitPerTimePeriod->getAmount());
                    }
                    if ($amountLimitPerTimePeriod->isSetCurrencyCode()) {
                        $this->ipnLogFile->writeLine("          CurrencyCode");
                        $this->ipnLogFile->writeLine(
                                "              " . $amountLimitPerTimePeriod->getCurrencyCode());
                    }
                }
                if ($billingAgreementLimits->isSetTimePeriodStartDate()) {
                    $this->ipnLogFile->writeLine("      TimePeriodStartDate");
                    $this->ipnLogFile->writeLine(
                            "          " . $billingAgreementLimits->getTimePeriodStartDate());
                }
                if ($billingAgreementLimits->isSetTimePeriodEndDate()) {
                    $this->ipnLogFile->writeLine("      TimePeriodEndDate");
                    $this->ipnLogFile->writeLine(
                            "          " . $billingAgreementLimits->getTimePeriodEndDate());
                }
                if ($billingAgreementLimits->isSetCurrentRemainingBalance()) {
                    $this->ipnLogFile->writeLine("      CurrentRemainingBalance");
                    $currentRemainingBalance = $billingAgreementLimits->getCurrentRemainingBalance();
                    if ($currentRemainingBalance->isSetAmount()) {
                        $this->ipnLogFile->writeLine("          Amount");
                        $this->ipnLogFile->writeLine(
                                "              " . $currentRemainingBalance->getAmount());
                    }
                    if ($currentRemainingBalance->isSetCurrencyCode()) {
                        $this->ipnLogFile->writeLine("          CurrencyCode");
                        $this->ipnLogFile->writeLine(
                                "              " . $currentRemainingBalance->getCurrencyCode());
                    }
                }
            }
            if ($billingAgreement->isSetBillingAgreementStatus()) {
                $this->ipnLogFile->writeLine("  BillingAgreementStatus");
                $billingAgreementStatus = $billingAgreement->getBillingAgreementStatus();
                if ($billingAgreementStatus->isSetState()) {
                    $this->ipnLogFile->writeLine("          State");
                    $this->ipnLogFile->writeLine("          " . $billingAgreementStatus->getState());
                }
                if ($billingAgreementStatus->isSetLastUpdateTimestamp()) {
                    $this->ipnLogFile->writeLine("          LastUpdateTimestamp");
                    $this->ipnLogFile->writeLine(
                            "          " . $billingAgreementStatus->getLastUpdateTimestamp());
                }
                if ($billingAgreementStatus->isSetReasonCode()) {
                    $this->ipnLogFile->writeLine("          ReasonCode");
                    $this->ipnLogFile->writeLine(
                            "          " . $billingAgreementStatus->getReasonCode());
                }
                if ($billingAgreementStatus->isSetReasonDescription()) {
                    $this->ipnLogFile->writeLine("          ReasonDescription");
                    $this->ipnLogFile->writeLine(
                            "          " . $billingAgreementStatus->getReasonDescription());
                }
            }
            if ($billingAgreement->isSetCreationTimestamp()) {
                $this->ipnLogFile->writeLine("  CreationTimestamp");
                $this->ipnLogFile->writeLine("      " . $billingAgreement->getCreationTimestamp());
            }
            if ($billingAgreement->isSetBillingAgreementConsent()) {
                $this->ipnLogFile->writeLine("  BillingAgreementConsent");
                $this->ipnLogFile->writeLine(
                        "      " . $billingAgreement->getBillingAgreementConsent());
            }
        }
    }
525373
public function logNotificationContents() 
    {
        $this->ipnLogFile->writeLine("Authorization Notification @ ".date("Y-m-d H:i:s") . " (GMT)");
        $this->ipnLogFile->writeLine("=============================================================================");
        if ($this->notification->isSetAuthorizationDetails()) {
            $this->ipnLogFile->writeLine("    AuthorizeDetails");
            $authorizationDetails = $this->notification->getAuthorizationDetails();
            if ($authorizationDetails->isSetAmazonAuthorizationId()) {
                $this->ipnLogFile->writeLine("    AmazonAuthorizationId");
                $this->ipnLogFile->writeLine("          " . $authorizationDetails->getAmazonAuthorizationId());
            }
            if ($authorizationDetails->isSetAuthorizationReferenceId()) {
                $this->ipnLogFile->writeLine("      AuthorizationReferenceId");
                $this->ipnLogFile->writeLine("          " . $authorizationDetails->getAuthorizationReferenceId());
            }
            if ($authorizationDetails->isSetAuthorizationAmount()) {
                $this->ipnLogFile->writeLine("      AuthorizationAmount");
                $authorizationAmount = $authorizationDetails->getAuthorizationAmount();
                if ($authorizationAmount->isSetAmount()) {
                    $this->ipnLogFile->writeLine("          Amount");
                    $this->ipnLogFile->writeLine("              " . $authorizationAmount->getAmount());
                }
                if ($authorizationAmount->isSetCurrencyCode()) {
                    $this->ipnLogFile->writeLine("          CurrencyCode");
                    $this->ipnLogFile->writeLine("              " . $authorizationAmount->getCurrencyCode());
                }
            }
            if ($authorizationDetails->isSetCapturedAmount()) {
                $this->ipnLogFile->writeLine("       CapturedAmount");
                $capturedAmount = $authorizationDetails->getCapturedAmount();
                if ($capturedAmount->isSetAmount()) {
                    $this->ipnLogFile->writeLine("          Amount");
                    $this->ipnLogFile->writeLine("              " . $capturedAmount->getAmount());
                }
                if ($capturedAmount->isSetCurrencyCode()) {
                    $this->ipnLogFile->writeLine("          CurrencyCode");
                    $this->ipnLogFile->writeLine("             " . $capturedAmount->getCurrencyCode());
                }
            }
            if ($authorizationDetails->isSetAuthorizationFee()) {
                $this->ipnLogFile->writeLine("      AuthorizationFee");
                $authorizationFee = $authorizationDetails->getAuthorizationFee();
                if ($authorizationFee->isSetAmount()) {
                    $this->ipnLogFile->writeLine("          Amount");
                    $this->ipnLogFile->writeLine("              " . $authorizationFee->getAmount());
                }
                if ($authorizationFee->isSetCurrencyCode()) {
                    $this->ipnLogFile->writeLine("          CurrencyCode");
                    $this->ipnLogFile->writeLine("              " . $authorizationFee->getCurrencyCode());
                }
            }
            if ($authorizationDetails->isSetIdList()) {
                $this->ipnLogFile->writeLine("      IdList");
                $idList = $authorizationDetails->getIdList();
                $memberList  =  $idList->getId();
                foreach ($memberList as $member) {
                    $this->ipnLogFile->writeLine("          member");
                    $this->ipnLogFile->writeLine("              " . $member);
                }
            }
            if ($authorizationDetails->isSetCreationTimestamp()) {
                $this->ipnLogFile->writeLine("      CreationTimestamp");
                $this->ipnLogFile->writeLine("           " . $authorizationDetails->getCreationTimestamp());
            }
            if ($authorizationDetails->isSetExpirationTimestamp()) {
                $this->ipnLogFile->writeLine("      ExpirationTimestamp");
                $this->ipnLogFile->writeLine("           " . $authorizationDetails->getExpirationTimestamp());
            }
            if ($authorizationDetails->isSetAuthorizationStatus()) {
                $this->ipnLogFile->writeLine("      AuthorizationStatus");
                $authorizationStatus = $authorizationDetails->getAuthorizationStatus();
                if ($authorizationStatus->isSetState()) {
                    $this->ipnLogFile->writeLine("          State");
                    $this->ipnLogFile->writeLine("              " . $authorizationStatus->getState());
                }
                if ($authorizationStatus->isSetLastUpdateTimestamp()) {
                    $this->ipnLogFile->writeLine("          LastUpdateTimestamp");
                    $this->ipnLogFile->writeLine("              " . $authorizationStatus->getLastUpdateTimestamp());
                }
                if ($authorizationStatus->isSetReasonCode()) {
                    $this->ipnLogFile->writeLine("          ReasonCode");
                    $this->ipnLogFile->writeLine("              " . $authorizationStatus->getReasonCode());
                }
                if ($authorizationStatus->isSetReasonDescription()) {
                    $this->ipnLogFile->writeLine("          ReasonDescription");
                    $this->ipnLogFile->writeLine("              " . $authorizationStatus->getReasonDescription());
                }
            }
            if ($authorizationDetails->isSetOrderItemCategories()) {
                $this->ipnLogFile->writeLine("       OrderItemCategories");
                $orderItemCategories = $authorizationDetails->getOrderItemCategories();
                $orderItemCategoryList  =  $orderItemCategories->getOrderItemCategory();
                foreach ($orderItemCategoryList as $orderItemCategory) {
                    $this->ipnLogFile->writeLine("          OrderItemCategory");
                    $this->ipnLogFile->writeLine("              " . $orderItemCategory);
                }
            }
            if ($authorizationDetails->isSetCaptureNow()) {
                $this->ipnLogFile->writeLine("      CaptureNow");
                $this->ipnLogFile->writeLine("          " . $authorizationDetails->getCaptureNow());
            }
            if ($authorizationDetails->isSetSoftDescriptor()) {
                $this->ipnLogFile->writeLine("      SoftDescriptor");
                $this->ipnLogFile->writeLine("          " . $authorizationDetails->getSoftDescriptor());
            }
        }
    }
320590
public function log($message)
    {
        $messages = (array) $message;
        foreach ($messages as $message) {
            $this->getLogger()->info($this->prependHandle($message));
        }
    }
674933
protected function logCoverage()
    {
        if (!$this->hasCoverage()) {
            return;
        }

        $filteredOptions = $this->options->filtered;

        $reporter = $this->getCoverage()->getReporter();

        if (isset($filteredOptions['coverage-clover'])) {
            $reporter->clover($filteredOptions['coverage-clover']);
        }

        if (isset($filteredOptions['coverage-html'])) {
            $reporter->html($filteredOptions['coverage-html']);
        }
        if (isset($filteredOptions['coverage-text'])) {
            $reporter->text();
        }

        if (isset($filteredOptions['coverage-xml'])) {
            $reporter->xml($filteredOptions['coverage-xml']);
        }

        $reporter->php($filteredOptions['coverage-php']);
    }
799200
public function logSuccess()
  {
    $this->_lastSuccess = true;
    if ($this->_debug) {
      printf("[LoadBalancer] Success for %s<br />\n", $this->_connectionStrings[$this->_lastReturnedIndex] . (isset($this->_storageNames[$this->_lastReturnedIndex]) ? '|' . $this->_storageNames[$this->_lastReturnedIndex] : ''));
    }
    $hash = md5($this->_connectionStrings[$this->_lastReturnedIndex] . (isset($this->_storageNames[$this->_lastReturnedIndex]) ? '|' . $this->_storageNames[$this->_lastReturnedIndex] : ''));
    if (file_exists($this->_statusFilePrefix . $hash)) {
      unlink($this->_statusFilePrefix . $hash);
    }
  }
438153
public function actionReadAll()
    {
        $notificationsIds = Yii::$app->request->post('ids', []);

        foreach ($notificationsIds as $id) {
            $notification = $this->getNotification($id);

            $notification->seen = 1;
            $notification->save();
        }

        return true;
    }
379858
public function log($message)
    {

        if (!empty($this->log_file)) {
            //echo $message;
            \file_put_contents($this->log_file, "\n" . $message, \FILE_APPEND);
        }
    }
878476
protected function log(Args $args)
    {
        $message = sprintf("%s%s", $this->render($args), PHP_EOL);
        file_put_contents($this->getStream(), $message);
    }
538431
public static function printLog()
    {
        if (! empty(self::$process->debugLog)) {

            if (PHP_SAPI !== 'cli') {
                $out = [];
                foreach (self::$process->debugLog as $item) {
                    $out[] = '<pre>' . htmlspecialchars($item) . '</pre>';
                }
                echo implode('<hr>', $out);
            }
            else {
                echo implode(PHP_EOL, self::$process->debugLog), PHP_EOL;
            }
        }
    }
611631
def _log(self, content):
        
        self._buffer += content
        if self._auto_flush:
            self.flush()
748481
protected function _log($contents, $log) {
		$config = [
			'level' => LOG_DEBUG,
			'scope' => 'email',
		];
		if ($log !== true) {
			if (!is_array($log)) {
				$log = ['level' => $log];
			}
			$config = array_merge($config, $log);
		}

		Log::write(
			$config['level'],
			PHP_EOL . $contents['headers'] . PHP_EOL . $contents['message'],
			$config['scope']
		);
	}
820621
public function log() {
		$log = $this->pipeline->getLogger();
		if($log->exists()) {
			$content = $log->content();
		} else {
			$content = 'Waiting for action to start';
		}

		$sendJSON = (strpos($this->request->getHeader('Accept'), 'application/json') !== false)
			|| $this->request->getExtension() == 'json';

		$content = preg_replace('/(?:(?:\r\n|\r|\n)\s*){2}/s', "\n", $content);
		if($sendJSON) {
			$this->response->addHeader("Content-type", "application/json");
			return json_encode(array(
				'status' => $this->pipeline->Status,
				'content' => $content,
			));

		} else {
			$this->response->addHeader("Content-type", "text/plain");
			return $content;
		}
	}
1008115
protected function log($message): void
    {
        if ($this->logger !== null) {
            $this->logger->log($message);
        }
    }
152716
public function log() {
		$this->empty = true;
		$log = array ();
		
		$pattern = "/\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\].*/";
		
		$log_levels = $this->getLevels ();
		
		//$log_file = glob ( $this->path . '/log-' . $this->sapi . '*-' . $this->fileName . '.txt' );
		$log_file = $this->path.'/'.$this->fileName;
		
		if (! empty ( $log_file ) && File::exists ( $log_file ) ) {
			$this->empty = false;
			$file = File::get ( $log_file );

			// There has GOT to be a better way of doing this...
			preg_match_all ( $pattern, $file, $headings );
			$log_data = preg_split ( $pattern, $file );

			if ($log_data [0] < 1) {
				$trash = array_shift ( $log_data );
				unset ( $trash );
			}
			
			
			foreach ( $headings as $h ) {
				for($i = 0, $j = count ( $h ); $i < $j; $i ++) {
					foreach ( $log_levels as $ll ) {
						if ($this->level == $ll or $this->level == 'all') {
							if (strpos ( strtolower ( $h [$i] ), strtolower ( 'production.' . $ll ) )) {
								$log [] = array (
										'level' => $ll,
										'header' => $h [$i],
										'stack' => $log_data [$i] 
								);
							}
						}
					}
				}
			}
		}
		
		unset ( $headings );
		unset ( $log_data );
		
		if (strtolower ( Config::get ( 'logviewer::log_order' ) ) == "desc") {
			$log = array_reverse ( $log );
		}
		
		return $log;
	}
728867
public function log($message)
	{
		if($this->logLevel == self::LOG_NORMAL) {
			fwrite(STDOUT, "*** " . $message . "\n");
		}
		else if($this->logLevel == self::LOG_VERBOSE) {
			fwrite(STDOUT, "** [" . strftime('%T %Y-%m-%d') . "] " . $message . "\n");
		}
	}
338199
public function log()
    {
        if (count(self::$loggers) === 0) {
            error_log($this->getSummary(), 0);
        } else {
            foreach (self::$loggers as $logger) {
                $logger->log($this);
            }
        }
    }
1232898
protected function _log($messages)
    {
        if (!is_array($messages)) {
            $messages = [$messages];
        }
        foreach ($messages as $message) {
            file_put_contents(static::$logFile, date('d.m.Y H:i:s') . ' - ' . $message . PHP_EOL, FILE_APPEND | LOCK_EX);
        }
    }