mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
Use proper log level depending on debug mode
This commit is contained in:
@@ -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]));
|
||||
|
Reference in New Issue
Block a user