The "Response start" log entry is currently set to INFO level, which creates significant overhead in production logs. This change moves that entry to DEBUG and adds explicit debug logging for unknown incoming requests that are neither direct objects
nor valid PUSH notifications.
Diff:
1 diff --git a/api/paymentmethods/response.php b/api/paymentmethods/response.php
2 --- a/api/paymentmethods/response.php
3 +++ b/api/paymentmethods/response.php
4 @@ -60,11 +60,13 @@
5 {
6 $this->logger = new Logger(Logger::INFO, 'response');
7 - $this->logger->logInfo("\n\n\n\n***************** Response start ***********************");
8 + $this->logger->logDebug("\n\n\n\n***************** Response start ***********************");
9
10 if ($response) {
11 // ... logic ...
12 } else {
13 $this->isPush = $this->isPushRequest();
14 $this->received = true;
15 - $this->logger->logInfo('Response determined to be a push request');
16 - $this->parsePushRequest();
17 + if ($this->isPush) {
18 + $this->logger->logInfo('Response determined to be a push request');
19 + $this->parsePushRequest();
20 + } else {
21 + $this->logger->logDebug('Unknown non-push request received');
22 + }
23 }
24 }
The "Response start" log entry is currently set to INFO level, which creates significant overhead in production logs. This change moves that entry to DEBUG and adds explicit debug logging for unknown incoming requests that are neither direct objects
nor valid PUSH notifications.
Diff:
10 if ($response) {
11 // ... logic ...
12 } else {
13 $this->isPush = $this->isPushRequest();
14 $this->received = true;
15 - $this->logger->logInfo('Response determined to be a push request');
16 - $this->parsePushRequest();
17 + if ($this->isPush) {
18 + $this->logger->logInfo('Response determined to be a push request');
19 + $this->parsePushRequest();
20 + } else {
21 + $this->logger->logDebug('Unknown non-push request received');
22 + }
23 }
24 }