Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
4042178a
Commit
4042178a
authored
Oct 10, 2015
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update README.md
parent
186c1592
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
README.md
README.md
+9
-1
example-getUpdatesCLI.php
example-getUpdatesCLI.php
+1
-1
example-hook.php
example-hook.php
+1
-1
No files found.
README.md
View file @
4042178a
...
...
@@ -287,12 +287,20 @@ print_r($results);
### Logging
Thrown Exception are stored in TelegramException.log file.
Incoming update
can be logged on a text file, set this option
with the methods:
Incoming update
(json string from webhook and getUpdates) can be logged on a text file, set those options
with the methods:
```
php
$telegram
->
setLogRequests
(
true
);
$telegram
->
setLogPath
(
$BOT_NAME
.
'.log'
);
```
(New!) Set verbosity to 3, to log also curl requests and responses from the bot to Telegram:
```
php
$telegram
->
setLogRequests
(
true
);
$telegram
->
setLogPath
(
$BOT_NAME
.
'.log'
);
$telegram
->
setLogVerbosity
(
3
);
```
-----
This code is available on
[
Github
](
https://github.com/akalongman/php-telegram-bot
)
. Pull
...
...
example-getUpdatesCLI.php
View file @
4042178a
...
...
@@ -25,7 +25,7 @@ try {
//$telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here'));
//$telegram->setLogRequests(true);
//$telegram->setLogPath($BOT_NAME.'.log');
//$telegram->setLogVerbosity(3);
// handle telegram getUpdate request
$telegram
->
handleGetUpdates
();
...
...
example-hook.php
View file @
4042178a
...
...
@@ -21,7 +21,7 @@ try {
//$telegram->setCommandConfig('date', array('google_api_key'=>'your_google_api_key_here'));
//$telegram->setLogRequests(true);
//$telegram->setLogPath($BOT_NAME.'.log');
//$telegram->setLogVerbosity(4);
// handle telegram webhook request
$telegram
->
handle
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment