We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在Application里发现,在初始化Cache的时候使用了:
if (!empty($this['config']['cache']) && $this['config']['cache'] instanceof CacheInterface) { $this['cache'] = $this['config']['cache']; } else { $this['cache'] = function () { return new FilesystemCache(sys_get_temp_dir()); }; }
而在日志初始化的时候却采用了另外的一种初始方式:
private function initializeLogger() { if (Log::hasLogger()) { return; } $logger = new Logger('easywechat'); if (!$this['config']['debug'] || defined('PHPUNIT_RUNNING')) { $logger->pushHandler(new NullHandler()); } elseif ($logFile = $this['config']['log.file']) { $logger->pushHandler(new StreamHandler($logFile, $this['config']->get('log.level', Logger::WARNING))); } Log::setLogger($logger); }
这种只考虑使用StreamHandler的方式如果在系统希望使用统一的Mologo方式来管理日志会出现问题。是否可以考虑类似于Cache的初始化方式
elseif ($this['config']['logHandler'] instanceof LoggerInterface) { $logger->pushHandler($log) } elseif ($logFile = $this['config']['log.file']) { $logger->pushHandler(new StreamHandler($logFile, $this['config']->get('log.level', Logger::WARNING)));
The text was updated successfully, but these errors were encountered:
@403studio 欢迎 PR
Sorry, something went wrong.
No branches or pull requests
在Application里发现,在初始化Cache的时候使用了:
而在日志初始化的时候却采用了另外的一种初始方式:
这种只考虑使用StreamHandler的方式如果在系统希望使用统一的Mologo方式来管理日志会出现问题。是否可以考虑类似于Cache的初始化方式
The text was updated successfully, but these errors were encountered: