Skip to content

Commit

Permalink
Merge pull request #59 from mitchclarkebase2/master
Browse files Browse the repository at this point in the history
Add multiline pattern option for task def logs
  • Loading branch information
Guslington authored Sep 18, 2020
2 parents b005fc4 + ee6822c commit d39ec4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ecs-service.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
}
}

if task.has_key?('log_pattern')
task_def[:LogConfiguration][:Options]["awslogs-multiline-pattern"] = task['log_pattern']
end

task_def.merge!({ MemoryReservation: task['memory'] }) if task.has_key?('memory')
task_def.merge!({ Memory: task['memory_hard'] }) if task.has_key?('memory_hard')
task_def.merge!({ Cpu: task['cpu'] }) if task.has_key?('cpu')
Expand Down
2 changes: 2 additions & 0 deletions ecs-service.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ log_retention: 7
# image: data
# memory: 128
# tag_param: DataTag
# NOTE: specify log_pattern (below) if you want to add an awslogs-multiline-pattern to the log driver, otherwise leave it out
# log_pattern: "^INFO"
# not_essential: true
# env_vars:
# KEY: value
Expand Down

0 comments on commit d39ec4c

Please sign in to comment.