@@ -155,16 +155,22 @@ task_json(Config, RabbitmqConf) ->
155
155
RabbitmqImage = ? config (rabbitmq_image , Config ),
156
156
RabbitmqErlangCookie = ? config (rabbitmq_erlang_cookie , Config ),
157
157
ServiceName = ? config (ecs_service_name , Config ),
158
+ ClusterName = ? config (ecs_cluster_name , Config ),
158
159
159
160
{ok , Binary } = file :read_file (filename :join (DataDir , " task_definition.json" )),
160
161
TaskDef = rabbit_json :decode (Binary ),
161
162
162
163
[RabbitContainerDef , SidecarContainerDef ] = maps :get (<<" containerDefinitions" >>, TaskDef ),
164
+ LogConfiguration = maps :get (<<" logConfiguration" >>, RabbitContainerDef ),
165
+ Options = maps :get (<<" options" >>, LogConfiguration ),
166
+ Options1 = Options #{<<" awslogs-stream-prefix" >> := list_to_binary (ClusterName )},
167
+ LogConfiguration1 = LogConfiguration #{<<" options" >> := Options1 },
163
168
RabbitContainerDef1 =
164
169
RabbitContainerDef #{
165
170
<<" image" >> := list_to_binary (RabbitmqImage ),
166
171
<<" environment" >> := [#{<<" name" >> => <<" RABBITMQ_ERLANG_COOKIE" >>,
167
- <<" value" >> => list_to_binary (RabbitmqErlangCookie )}]
172
+ <<" value" >> => list_to_binary (RabbitmqErlangCookie )}],
173
+ <<" logConfiguration" >> := LogConfiguration1
168
174
},
169
175
SidecarContainerDef1 =
170
176
SidecarContainerDef #{<<" environment" >> := [#{<<" name" >> => <<" DATA" >>,
0 commit comments