Commit e039140e authored by Tino Goratsch's avatar Tino Goratsch

only use the filemanagers logger when the ACP3 is in development mode

parent 7a54c8da
Pipeline #43957482 passed with stages
in 2 minutes and 47 seconds
......@@ -8,9 +8,23 @@
namespace ACP3\Modules\ACP3\Filemanager\Controller\Admin\Index;
use ACP3\Core\Controller\AbstractFrontendAction;
use ACP3\Core\Controller\Context\FrontendContext;
use ACP3\Core\Environment\ApplicationMode;
class RichFileManager extends AbstractFrontendAction
{
/**
* @var string
*/
private $applicationMode;
public function __construct(FrontendContext $context, string $applicationMode)
{
parent::__construct($context);
$this->applicationMode = $applicationMode;
}
/**
* @throws \Exception
*/
......@@ -34,6 +48,10 @@ class RichFileManager extends AbstractFrontendAction
private function getFileManagerConfig(): array
{
return [
'logger' => [
'enabled' => $this->applicationMode === ApplicationMode::DEVELOPMENT,
'file' => $this->appPath->getCacheDir() . 'logs/filemanager.log',
],
'security' => [
'patterns' => [
'policy' => 'DISALLOW_LIST',
......
......@@ -7,3 +7,4 @@ services:
class: ACP3\Modules\ACP3\Filemanager\Controller\Admin\Index\RichFileManager
arguments:
- '@core.context.frontend'
- '%core.environment%'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment