Skip to content

Commit

Permalink
update to monolog v2
Browse files Browse the repository at this point in the history
  • Loading branch information
yansongda committed Sep 21, 2019
1 parent ff56925 commit 841999b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/Pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Yansongda\Pay\Listeners\KernelLogSubscriber;
use Yansongda\Supports\Config;
use Yansongda\Supports\Log;
use Yansongda\Supports\Logger;
use Yansongda\Supports\Str;

/**
Expand Down Expand Up @@ -115,15 +116,13 @@ protected function make($gateway): GatewayApplicationInterface
*/
protected function registerLogService()
{
$logger = Log::createLogger(
$this->config->get('log.file'),
'yansongda.pay',
$this->config->get('log.level', 'warning'),
$this->config->get('log.type', 'daily'),
$this->config->get('log.max_file', 30)
);

Log::setLogger($logger);
$config = $this->config->get('log');
$config['identify'] = 'yansongda.pay';

$logger = new Logger();
$logger->setConfig($config);

Log::setInstance($logger);
}

/**
Expand Down

0 comments on commit 841999b

Please sign in to comment.