Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 4917684

Browse files
committed
Better logging
1 parent ef81da2 commit 4917684

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/TgLog.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ protected function sendRequestToTelegram(TelegramMethods $method, array $formDat
124124
{
125125
$this->logger->debug('About to instantiate HTTP Client');
126126
$client = new Client();
127-
$this->logger->info('About to perform POST to Telegram bot API');
128127
$response = $client->post($this->composeApiMethodUrl($method), $formData);
129128
$this->logger->debug('Got response back from Telegram, applying json_decode');
130129
return json_decode((string)$response->getBody(), true);
@@ -209,7 +208,7 @@ protected function composeApiMethodUrl(TelegramMethods $call): string
209208
{
210209
$completeClassName = get_class($call);
211210
$this->methodName = substr($completeClassName, strrpos($completeClassName, '\\') + 1);
212-
$this->logger->debug(sprintf('Selected API method is %s', $this->methodName));
211+
$this->logger->info('About to perform API request', ['method' => $this->methodName]);
213212

214213
return $this->apiUrl . $this->methodName;
215214
}

0 commit comments

Comments
 (0)