ecs_composex.ecs.ecs_family.family_logging package

Submodules

ecs_composex.ecs.ecs_family.family_logging.cw_logging module

ecs_composex.ecs.ecs_family.family_logging.cw_logging. add_container_level_log_group ( family , service , log_group_access_sid , grant_task_role_access = False ) [source]

Method to add a new log group for a specific container/service defined when awslogs-group has been set.

Parameters :
ecs_composex.ecs.ecs_family.family_logging.cw_logging. create_log_group ( family , group_name , grant_task_role_access = False ) [source]

Function to create a new Log Group for the services :rtype: troposphere.logs.LogGroup :return:

ecs_composex.ecs.ecs_family.family_logging.cw_logging. logging_from_defined_region ( family , service ) [source]

If the region for a log group is given, we just take the shortcut to granting all access to logs in all regions, for any log group / stream.

Parameters :
Return type :

None

Returns :

Module contents

class ecs_composex.ecs.ecs_family.family_logging. FamilyLogging ( family ) [source]

Bases: object

Variables :

family_log_group ( LogGroup ) –

property api_health_enabled
property buffer_limit_mb

Returns the amount, in MB, of RAM to use for the log router (fluentbit) container

property cpu_limits : float
property cw_log_retention : int
property family : ComposeFamily
property family_log_group : LogGroup
property grace_period
handle_awslogs_logging ( use_firelens ) [source]

Method to go over each service logging configuration and accordingly define the IAM permissions needed for the exec role

If the region was passed in the log driver options, just grant access to any lo group ElIf the group name is set and is a string, passed by the log driver options, just grant access to it.

handle_firelens ( settings ) [source]
init_family_services_log_configuration ( ) [source]
Return type :

None

set_init_family_service_logging ( service , awslogs_options ) [source]
update_cw_log_retention ( ) [source]
update_family_services_logging_configuration ( settings , apply_to_sidecars = False ) [source]

Updates all the container definitions of the ComposeFamily services