diff --git a/.env.example b/.env.example index 030bf24..169df2c 100644 --- a/.env.example +++ b/.env.example @@ -11,6 +11,8 @@ INDEX_MESSAGE="Welcome to i-c-a.su client for telegram. \nIf you have questions # TELEGRAM CLIENT TELEGRAM_API_ID= TELEGRAM_API_HASH= +# ERROR = 1; WARNING = 2; const NOTICE = 3; VERBOSE = 4; ULTRA_VERBOSE = 5; +LOGGER_LEVEL=3 # TELEGRAM SOCKS5 PROXY (optional) TELEGRAM_PROXY_ADDRESS= diff --git a/composer.json b/composer.json index 0f7d8f7..ba7805e 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "php": ">=7.2.0", "ext-json": "*", "ext-swoole": ">=4.1", - "danog/madelineproto":"dev-master", + "danog/madelineproto":"dev-session_optimization", "amphp/dns": "dev-master as 0.9.9", "amphp/file": "dev-master as 0.3.3", "amphp/uri": "dev-master as 0.1.3", diff --git a/composer.lock b/composer.lock index fe67ad2..9eea0a1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "308dc823c837683776469789ec856985", + "content-hash": "fde6d73b5cdc03736a0e1f0268c330b0", "packages": [ { "name": "amphp/amp", @@ -1045,11 +1045,11 @@ }, { "name": "danog/madelineproto", - "version": "dev-master", + "version": "dev-session_optimization", "source": { "type": "git", "url": "https://github.com/xtrime-ru/MadelineProto.git", - "reference": "d18d97d208ef7d39e73cd117b55efc2208dd7819" + "reference": "694d092ade9a8af0d32d58579c3a7d52df1b2537" }, "require": { "amphp/amp": "^2.0", @@ -1121,7 +1121,7 @@ "telegram", "video" ], - "time": "2019-05-13T16:06:16+00:00" + "time": "2019-05-14T22:27:21+00:00" }, { "name": "danog/magicalserializer", diff --git a/config.php b/config.php index ab9945e..d2dc0c8 100644 --- a/config.php +++ b/config.php @@ -18,7 +18,7 @@ return [ ], 'logger' => [ // Logger settings 'logger' => 3, // 0 - Logs disabled, 3 - echo logs. - 'logger_level' => \danog\MadelineProto\Logger::FATAL_ERROR, // Logging level, available logging levels are: ULTRA_VERBOSE - 0, VERBOSE - 1 , NOTICE - 2, WARNING - 3, ERROR - 4, FATAL_ERROR - 5. + 'logger_level' => (int) getenv('LOGGER_LEVEL'), // Logging level, available logging levels are: ULTRA_VERBOSE - 0, VERBOSE - 1 , NOTICE - 2, WARNING - 3, ERROR - 4, FATAL_ERROR - 5. ], 'updates' => [ 'handle_updates' => false, // Should I handle updates?