mirror of
https://github.com/flarum/framework.git
synced 2025-02-26 18:57:57 +08:00
Use proper log level depending on debug mode
This commit is contained in:
parent
7cec4d1f42
commit
687e1e2789
@ -174,7 +174,8 @@ class InstalledSite implements SiteInterface
|
||||
protected function registerLogger(Container $container)
|
||||
{
|
||||
$logPath = $this->paths->storage.'/logs/flarum.log';
|
||||
$handler = new RotatingFileHandler($logPath, 0, Logger::INFO);
|
||||
$logLevel = $this->config->inDebugMode() ? Logger::DEBUG : Logger::INFO;
|
||||
$handler = new RotatingFileHandler($logPath, 0, $logLevel);
|
||||
$handler->setFormatter(new LineFormatter(null, null, true, true));
|
||||
|
||||
$container->instance('log', new Logger('flarum', [$handler]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user