Skip to content

Commit 48c3d39

Browse files
committed
Update Logging My Requests
1 parent 6c4fd74 commit 48c3d39

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/MyRequests.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ public function guzzlePhpRequest($url = '', $data = array(), $method = 'GET')
601601
{
602602
$this->logger->debug(__FUNCTION__, '/------------> ' . __FUNCTION__ . ' <------------\\');
603603
$inputParams = array('url' => $url, 'data' => $data, 'method' => $method);
604-
$this->logger->info(__FUNCTION__, 'input Params: ', $inputParams);
604+
$this->logger->debug(__FUNCTION__, 'input Params: ', $inputParams);
605605
$method = strtoupper($method);
606606
$endpoint = trim($url);
607607
$this->logger->debug(__FUNCTION__, 'cURL Endpoint: ', $endpoint);
@@ -723,7 +723,7 @@ public function guzzlePhpRequest($url = '', $data = array(), $method = 'GET')
723723
$this->logger->error(__FUNCTION__, 'Error Trace As String: ' . $e->getTraceAsString());
724724
}
725725
}
726-
$this->logger->info(__FUNCTION__, 'Final Result from Request: ', $result);
726+
$this->logger->debug(__FUNCTION__, 'Final Result from Request: ', $result);
727727

728728
return $result;
729729
}
@@ -757,7 +757,7 @@ public function curlRequest($url = '', $data = array(), $method = 'GET')
757757
$curl = new Curl();
758758
if ($this->isJson) {
759759
$data = json_encode($data);
760-
$this->logger->info(__FUNCTION__, 'isJson Data: ', $data);
760+
$this->logger->debug(__FUNCTION__, 'isJson Data: ', $data);
761761
}
762762
if ($this->userAgent) {
763763
$curl->setUserAgent($this->userAgent);
@@ -862,7 +862,7 @@ public function curlRequest($url = '', $data = array(), $method = 'GET')
862862
$curl->close();
863863
// Log Response
864864
if (isset($response)) {
865-
$this->logger->info(__FUNCTION__, 'Final Result from Request: ', $response);
865+
$this->logger->debug(__FUNCTION__, 'Final Result from Request: ', $response);
866866
}
867867
}
868868
catch (Exception $e) {
@@ -893,7 +893,7 @@ public function sendRequest($url = '', $data = array(), $method = 'GET')
893893
{
894894
$this->logger->debug(__FUNCTION__, '/------------> ' . __FUNCTION__ . ' <------------\\');
895895
$inputParams = array('url' => $url, 'data' => $data, 'method' => $method);
896-
$this->logger->info(__FUNCTION__, 'input Params: ', $inputParams);
896+
$this->logger->debug(__FUNCTION__, 'input Params: ', $inputParams);
897897
$method = strtoupper($method);
898898
$endpoint = trim($url);
899899
$this->logger->debug(__FUNCTION__, 'cURL Endpoint: ', $endpoint);
@@ -960,7 +960,7 @@ public function sendRequest($url = '', $data = array(), $method = 'GET')
960960
$this->logger->error(__FUNCTION__, 'Error Trace As String: ' . $e->getTraceAsString());
961961
}
962962
}
963-
$this->logger->info(__FUNCTION__, 'Final Result from Request: ', $result);
963+
$this->logger->debug(__FUNCTION__, 'Final Result from Request: ', $result);
964964

965965
return $result;
966966
}
@@ -981,10 +981,10 @@ public function sendRequest($url = '', $data = array(), $method = 'GET')
981981
public function xmlRequest($url = '', $data = '', $timeout = 60)
982982
{
983983
$this->logger->debug(__FUNCTION__, '/------------> ' . __FUNCTION__ . ' <------------\\');
984-
$inputParams = array('url' => $url, 'data' => $data, 'timeout' => $timeout);
985-
$this->logger->info(__FUNCTION__, 'input Params: ', $inputParams);
986984
$endpoint = trim($url);
987985
$this->logger->debug(__FUNCTION__, 'cURL Endpoint: ', $endpoint);
986+
$inputParams = array('url' => $url, 'data' => $data, 'timeout' => $timeout);
987+
$this->logger->debug(__FUNCTION__, 'input Params: ', $inputParams);
988988
if (!extension_loaded('curl')) {
989989
$this->logger->critical(__FUNCTION__, 'Server is not Support cURL, Please cURL. Library fallback user File Get Contents');
990990

@@ -1010,7 +1010,7 @@ public function xmlRequest($url = '', $data = '', $timeout = 60)
10101010
$this->setTimeout($timeout);
10111011
$result = $this->curlRequest($url, $data, 'POST');
10121012
}
1013-
$this->logger->info(__FUNCTION__, 'Final Result from Request: ', $result);
1013+
$this->logger->debug(__FUNCTION__, 'Final Result from Request: ', $result);
10141014

10151015
return $result;
10161016
}
@@ -1031,10 +1031,10 @@ public function xmlRequest($url = '', $data = '', $timeout = 60)
10311031
public function jsonRequest($url = '', $data = array(), $timeout = 60)
10321032
{
10331033
$this->logger->debug(__FUNCTION__, '/------------> ' . __FUNCTION__ . ' <------------\\');
1034-
$inputParams = array('url' => $url, 'data' => $data, 'timeout' => $timeout);
1035-
$this->logger->info(__FUNCTION__, 'input Params: ', $inputParams);
10361034
$endpoint = trim($url);
10371035
$this->logger->debug(__FUNCTION__, 'cURL Endpoint: ', $endpoint);
1036+
$inputParams = array('url' => $url, 'data' => $data, 'timeout' => $timeout);
1037+
$this->logger->debug(__FUNCTION__, 'input Params: ', $inputParams);
10381038
if (!extension_loaded('curl')) {
10391039
$this->logger->critical(__FUNCTION__, 'Server is not Support cURL, Please cURL. Library fallback user File Get Contents');
10401040

@@ -1060,7 +1060,7 @@ public function jsonRequest($url = '', $data = array(), $timeout = 60)
10601060
$this->setTimeout($timeout);
10611061
$result = $this->curlRequest($url, $data, 'POST');
10621062
}
1063-
$this->logger->info(__FUNCTION__, 'Final Result from Request: ', $result);
1063+
$this->logger->debug(__FUNCTION__, 'Final Result from Request: ', $result);
10641064

10651065
return $result;
10661066
}

0 commit comments

Comments
 (0)