From 566b4fd9b942e02bf5a4dd8ba227663fe3555cca Mon Sep 17 00:00:00 2001 From: Vincent Pietri Date: Tue, 2 Apr 2024 11:16:17 +0200 Subject: [PATCH] Remove hard log /tmp/debug.log, close #74 --- Helper/Register.php | 11 ----------- Plugin/Framework/Http/Response.php | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Helper/Register.php b/Helper/Register.php index e7796a1..0053f1a 100644 --- a/Helper/Register.php +++ b/Helper/Register.php @@ -36,11 +36,7 @@ public function __construct(Context $context, $this->objectFactory = $objectFactory; $this->qdbHelper = $qdbHelper; $this->services = $services; - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); - if($this->qdbHelper->isToolbarAccessAllowed() && $this->qdbHelper->isAjaxLoading()) { - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); - register_shutdown_function([$this, 'dumpToFile']); } } @@ -51,21 +47,14 @@ public function __construct(Context $context, */ public function dumpToFile() { - - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); - if($this->_getRequest() && $this->_getRequest()->getModuleName()=='quickdevbar') { - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); return false; } - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); foreach ($this->services as $serviceKey => $serviceObj) { $this->setRegisteredData($serviceKey, $serviceObj->pullData()); } - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); $content = $this->registeredData->convertToJson(); - file_put_contents('/tmp/debug.log', __METHOD__.__LINE__.PHP_EOL, FILE_APPEND); $this->qdbHelper->setWrapperContent($content); } diff --git a/Plugin/Framework/Http/Response.php b/Plugin/Framework/Http/Response.php index 781f260..2aadcaf 100644 --- a/Plugin/Framework/Http/Response.php +++ b/Plugin/Framework/Http/Response.php @@ -23,6 +23,6 @@ public function __construct( public function afterSendResponse(\Magento\Framework\HTTP\PhpEnvironment\Response $subject) { - //file_put_contents('/tmp/test.log', print_r($this->_qdbHelperRegister->getEvents(), true), FILE_APPEND ); + } }