Skip to content

Commit 4042178

Browse files
committed
update README.md
1 parent 186c159 commit 4042178

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,20 @@ print_r($results);
287287
### Logging
288288
Thrown Exception are stored in TelegramException.log file.
289289

290-
Incoming update can be logged on a text file, set this option with the methods:
290+
Incoming update (json string from webhook and getUpdates) can be logged on a text file, set those options with the methods:
291291
```php
292292
$telegram->setLogRequests(true);
293293
$telegram->setLogPath($BOT_NAME.'.log');
294294
```
295295

296+
(New!) Set verbosity to 3, to log also curl requests and responses from the bot to Telegram:
297+
298+
```php
299+
$telegram->setLogRequests(true);
300+
$telegram->setLogPath($BOT_NAME.'.log');
301+
$telegram->setLogVerbosity(3);
302+
```
303+
296304
-----
297305
This code is available on
298306
[Github](https://github.com/akalongman/php-telegram-bot). Pull

example-getUpdatesCLI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//$telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here'));
2626
//$telegram->setLogRequests(true);
2727
//$telegram->setLogPath($BOT_NAME.'.log');
28-
28+
//$telegram->setLogVerbosity(3);
2929

3030
// handle telegram getUpdate request
3131
$telegram->handleGetUpdates();

example-hook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//$telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here'));
2222
//$telegram->setLogRequests(true);
2323
//$telegram->setLogPath($BOT_NAME.'.log');
24-
24+
//$telegram->setLogVerbosity(4);
2525

2626
// handle telegram webhook request
2727
$telegram->handle();

0 commit comments

Comments
 (0)