code: def logging_set_filter(name, filter_def, ttl, **kwargs):
      
      ctx = Context(**kwargs)
      ctx.execute_action('logging:set_filter', **{
          'logging_service': ctx.repo.create_secure_service('logging'),
          'logger_name': name,
          'filter_def': filter_def,
          'ttl': ttl,
      })
docs: Set local filter.