def filter(self, record): container = get_container() record.url = "" record.request_id = "" record.user = "" if container: record.url = "- {0} ".format(container.request.url) record.request_id = "- {0} ".format(container.request_id) record.user = "******".format(container.permissions_validator.name) return True
def wrapper(*args, **kwargs): container = get_container() container.bucket_name = kwargs.get("bucket_name") result = func(container, *args, **kwargs) return result