File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -287,12 +287,20 @@ print_r($results);
287
287
### Logging
288
288
Thrown Exception are stored in TelegramException.log file.
289
289
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:
291
291
``` php
292
292
$telegram->setLogRequests(true);
293
293
$telegram->setLogPath($BOT_NAME.'.log');
294
294
```
295
295
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
+
296
304
-----
297
305
This code is available on
298
306
[ Github] ( https://github.com/akalongman/php-telegram-bot ) . Pull
Original file line number Diff line number Diff line change 25
25
//$telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here'));
26
26
//$telegram->setLogRequests(true);
27
27
//$telegram->setLogPath($BOT_NAME.'.log');
28
-
28
+ //$telegram->setLogVerbosity(3);
29
29
30
30
// handle telegram getUpdate request
31
31
$ telegram ->handleGetUpdates ();
Original file line number Diff line number Diff line change 21
21
//$telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here'));
22
22
//$telegram->setLogRequests(true);
23
23
//$telegram->setLogPath($BOT_NAME.'.log');
24
-
24
+ //$telegram->setLogVerbosity(4);
25
25
26
26
// handle telegram webhook request
27
27
$ telegram ->handle ();
You can’t perform that action at this time.
0 commit comments