@@ -23,12 +23,12 @@ use Monolog\Logger;
2323TelegramLog::initialize(
2424 // Main logger that handles all 'debug' and 'error' logs.
2525 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)),
2828 ]),
2929 // Updates logger for raw updates.
3030 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)),
3232 ])
3333);
3434```
@@ -41,15 +41,15 @@ If you store the raw data you can import all updates on the newest table schema
4141Remember to always backup first!!
4242
4343### 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:
4545``` php
4646\Longman\TelegramBot\TelegramLog::$always_log_request_and_response = true;
4747```
4848
4949### Hiding API token from the log
5050By default, the API token is removed from the log, to prevent any mistaken leakage when posting logs online.
5151This behaviour can be changed by setting the appropriate variable:
52- ``php
52+ ``` php
5353\Longman\TelegramBot\TelegramLog::$remove_bot_token = false;
5454```
5555
0 commit comments