mirror of
https://gitee.com/yansongda/pay.git
synced 2024-11-29 18:58:38 +08:00
update: 默认日志配置统一
This commit is contained in:
parent
bd5771faa6
commit
f12cc27bc4
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay;
|
||||
|
||||
use Yansongda\Pay\Contract\ConfigInterface;
|
||||
use Yansongda\Pay\Contract\LoggerInterface;
|
||||
use Yansongda\Pay\Exception\InvalidConfigException;
|
||||
|
||||
@ -28,7 +29,8 @@ class Logger
|
||||
*/
|
||||
public static function __callStatic(string $method, array $args): void
|
||||
{
|
||||
if (!Pay::hasContainer() || !Pay::has(LoggerInterface::class)) {
|
||||
if (!Pay::hasContainer() || !Pay::has(LoggerInterface::class) ||
|
||||
false === Pay::get(ConfigInterface::class)->get('logger.enable')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@ class ConfigServiceProvider implements ServiceProviderInterface
|
||||
* @var array
|
||||
*/
|
||||
private $config = [
|
||||
'log' => [
|
||||
'enable' => true,
|
||||
'logger' => [
|
||||
'enable' => false,
|
||||
'file' => null,
|
||||
'identify' => 'yansongda.pay',
|
||||
'level' => 'debug',
|
||||
|
Loading…
Reference in New Issue
Block a user