@@ -23,12 +23,12 @@ use Monolog\Logger;
23
23
TelegramLog::initialize(
24
24
// Main logger that handles all 'debug' and 'error' logs.
25
25
new Logger('telegram_bot', [
26
- (new StreamHandler($path_to_debug_log_file , Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true)),
27
- (new StreamHandler($path_to_error_log_file , Logger::ERROR))->setFormatter(new LineFormatter(null, null, true)),
26
+ (new StreamHandler('/path/to/debug_log_file' , Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true)),
27
+ (new StreamHandler('/path/to/error_log_file' , Logger::ERROR))->setFormatter(new LineFormatter(null, null, true)),
28
28
]),
29
29
// Updates logger for raw updates.
30
30
new Logger('telegram_bot_updates', [
31
- (new StreamHandler($path_to_updates_log_file , Logger::INFO))->setFormatter(new LineFormatter('%message%' . PHP_EOL)),
31
+ (new StreamHandler('/path/to/updates_log_file' , Logger::INFO))->setFormatter(new LineFormatter('%message%' . PHP_EOL)),
32
32
])
33
33
);
34
34
```
@@ -41,15 +41,15 @@ If you store the raw data you can import all updates on the newest table schema
41
41
Remember to always backup first!!
42
42
43
43
### Always log request and response data
44
- If you's like to always log the request and response data to the debug log, also for successful requests, you can set the appropriate variable:
44
+ If you'd like to always log the request and response data to the debug log, even for successful requests, you can set the appropriate variable:
45
45
``` php
46
46
\Longman\TelegramBot\TelegramLog::$always_log_request_and_response = true;
47
47
```
48
48
49
49
### Hiding API token from the log
50
50
By default, the API token is removed from the log, to prevent any mistaken leakage when posting logs online.
51
51
This behaviour can be changed by setting the appropriate variable:
52
- ``php
52
+ ``` php
53
53
\Longman\TelegramBot\TelegramLog::$remove_bot_token = false;
54
54
```
55
55
0 commit comments