Skip to content

Commit

Permalink
add requiring larval ^5.6;
Browse files Browse the repository at this point in the history
use logger level;
  • Loading branch information
grkamil committed Sep 22, 2018
1 parent 0c31d82 commit 2576e5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"require": {
"php": "^7.1.3",
"monolog/monolog": "^1.23"
"monolog/monolog": "^1.23",
"laravel/framework": "5.6.*|5.7.*"
},
"version":"0.1.0",
"minimum-stability": "dev",
Expand Down
4 changes: 3 additions & 1 deletion src/TelegramHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class TelegramHandler extends AbstractProcessingHandler
* TelegramHandler constructor.
* @param int $level
*/
public function __construct($level = Logger::DEBUG)
public function __construct($level)
{
$level = Logger::toMonologLevel($level);

parent::__construct($level, true);

// define variables for making Telegram request
Expand Down
2 changes: 1 addition & 1 deletion src/TelegramLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __invoke(array $config)
return new Logger(
env('APP_NAME'),
[
new TelegramHandler()
new TelegramHandler($config['level'])
]
);
}
Expand Down

0 comments on commit 2576e5b

Please sign in to comment.