Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750063
D219.id516.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.id516.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
@@ -135,13 +135,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 17, 20:37 (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249808
Default Alt Text
D219.id516.diff (2 KB)
Attached To
Mode
D219: GateController::logRequest refactoring
Attached
Detach File
Event Timeline
Log In to Comment