Page MenuHomeDevCentral

D219.id.diff
No OneTemporary

D219.id.diff

diff --git a/app/Http/Controllers/Gate/DockerHubGateController.php b/app/Http/Controllers/Gate/DockerHubGateController.php
--- a/app/Http/Controllers/Gate/DockerHubGateController.php
+++ b/app/Http/Controllers/Gate/DockerHubGateController.php
@@ -69,16 +69,6 @@
$this->payload = json_decode($this->rawRequestContent);
}
- /**
- * Logs the request
- */
- protected function logRequest () {
- Log::info('[Gate] New payload.', [
- 'service' => static::SERVICE_NAME,
- 'door' => $this->door
- ]);
- }
-
///
/// Payload processing
///
diff --git a/app/Http/Controllers/Gate/GateController.php b/app/Http/Controllers/Gate/GateController.php
--- a/app/Http/Controllers/Gate/GateController.php
+++ b/app/Http/Controllers/Gate/GateController.php
@@ -42,11 +42,11 @@
/**
* Logs the request
*/
- protected function logRequest () {
+ protected function logRequest ($extraContextualData = []) {
Log::info('[Gate] New payload.', [
'service' => static::SERVICE_NAME,
'door' => $this->door,
- ]);
+ ] + $extraContextualData);
}
///
diff --git a/app/Http/Controllers/Gate/GitHubGateController.php b/app/Http/Controllers/Gate/GitHubGateController.php
--- a/app/Http/Controllers/Gate/GitHubGateController.php
+++ b/app/Http/Controllers/Gate/GitHubGateController.php
@@ -79,7 +79,7 @@
// Process the request
- $this->logRequest();
+ $this->logGateRequest();
$this->onPayload();
// Output
@@ -138,10 +138,8 @@
/**
* Logs the request
*/
- protected function logRequest () {
- Log::info('[Gate] New payload.', [
- 'service' => static::SERVICE_NAME,
- 'door' => $this->door,
+ protected function logGateRequest () {
+ $this->logRequest([
'delivery' => $this->delivery,
'event' => $this->event,
]);
diff --git a/app/Http/Controllers/Gate/PhabricatorGateController.php b/app/Http/Controllers/Gate/PhabricatorGateController.php
--- a/app/Http/Controllers/Gate/PhabricatorGateController.php
+++ b/app/Http/Controllers/Gate/PhabricatorGateController.php
@@ -75,16 +75,6 @@
return $service->instance;
}
- /**
- * Logs the request
- */
- protected function logRequest () {
- Log::info('[Gate] New payload.', [
- 'service' => static::SERVICE_NAME,
- 'door' => $this->door
- ]);
- }
-
///
/// Payload processing
///

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 14:28 (5 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260373
Default Alt Text
D219.id.diff (2 KB)

Event Timeline