From 412ba0f192c5c2b9457c2737c7aab0e487b1b5bb Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 25 Dec 2023 13:11:19 +0100 Subject: [PATCH] new: [internal] New option `Security.ecs_log` to enable ECS logging --- app/Model/Log.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Model/Log.php b/app/Model/Log.php index 1df511650..81f802d30 100644 --- a/app/Model/Log.php +++ b/app/Model/Log.php @@ -429,14 +429,16 @@ class Log extends AppModel } /** - * TODO: Check if ECS is enabled - * * @param array $data * @return void * @throws JsonException */ private function sendToEcs(array $data) { + if (!Configure::read('Security.ecs_log')) { + return; + } + $action = $data['Log']['action']; $type = 'info'; if (isset($action)) {