Set local filter.

def logging_set_filter(name, filter_def, ttl, **kwargs):
    """
    Set local filter.
    """
    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,
    })