anaynayak commented on pull request #19022:
URL: https://github.com/apache/airflow/pull/19022#issuecomment-945758759


   thanks @ephraimbuddy for reviewing the PR. This is something that I had a 
question around as well (point 1 under [open 
questions](https://github.com/apache/airflow/pull/19022#issue-1028067825)) .
   
   I added those as arguments so that as a user we could override the config 
using the docs you linked. Kept the default value as true to retain existing 
behavior of creating log group implicitly. 
   
   Should I also add conf overridable values similar to what was done for 
[google_key_path](https://github.com/apache/airflow/blob/main/airflow/config_templates/airflow_local_settings.py#L209)?
   
   Something along the lines of 
   ```python
           create_cloudwatch_log_group = conf.get('logging', 
'CREATE_CLOUDWATCH_LOG_GROUP', fallback=True)
           create_cloudwatch_log_stream = conf.get('logging', 
'CREATE_CLOUDWATCH_LOG_STREAM', fallback=True)
           CLOUDWATCH_REMOTE_HANDLERS: Dict[str, Dict[str, str]] = {
               'task': {
                   'class': 
'airflow.providers.amazon.aws.log.cloudwatch_task_handler.CloudwatchTaskHandler',
                   'formatter': 'airflow',
                   'base_log_folder': str(os.path.expanduser(BASE_LOG_FOLDER)),
                   'log_group_arn': urlparse(REMOTE_BASE_LOG_FOLDER).netloc,
                   'filename_template': FILENAME_TEMPLATE,
                   'create_log_group': create_cloudwatch_log_group,
                   'create_log_stream': create_cloudwatch_log_stream,
               },
           }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to