Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769394
D219.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D219.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 14:28 (2 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260373
Default Alt Text
D219.id.diff (2 KB)
Attached To
Mode
D219: GateController::logRequest refactoring
Attached
Detach File
Event Timeline
Log In to Comment