diff --git a/CHANGELOG.md b/CHANGELOG.md index 580194c55..f878e244c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ All notable changes to this project will be documented in this file. ## [4.0.0-beta.399] - 2025-03-25 + ### 🚀 Features - *(database)* Disable MongoDB SSL by default in migration diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 12bfccfaf..b90de4dbc 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -3175,6 +3175,13 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int } } + $serviceAppsLogDrainEnabledMap = collect([]); + if ($resource instanceof Service) { + $serviceAppsLogDrainEnabledMap = $resource->applications()->get()->keyBy('name')->map(function ($app) { + return $app->isLogDrainEnabled(); + }); + } + // Parse the rest of the services foreach ($services as $serviceName => $service) { $image = data_get_str($service, 'image'); @@ -3185,6 +3192,9 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int if ($resource instanceof Application && $resource->isLogDrainEnabled()) { $logging = generate_fluentd_configuration(); } + if ($resource instanceof Service && $serviceAppsLogDrainEnabledMap->get($serviceName)) { + $logging = generate_fluentd_configuration(); + } } $volumes = collect(data_get($service, 'volumes', [])); $networks = collect(data_get($service, 'networks', []));