You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/06/24 14:07:39 UTC

[GitHub] [airflow] afischer-opentext-com commented on issue #15279: Error on logging empty line to Cloudwatch

afischer-opentext-com commented on issue #15279:
URL: https://github.com/apache/airflow/issues/15279#issuecomment-867666277


   Another approach is to wrap the LogHandler into something like this:
   
   ```(python)
   import watchtower
   
   
   class NoEmptyMessageHandler(watchtower.CloudWatchLogHandler):
       def emit(self, message):
           if isinstance(message.msg, str) and not message.msg:
               pass
           else:
               super().emit(message)
   ```
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org