Logger is now an attribute of the execution context

This commit is contained in:
2020-02-18 16:31:55 +01:00
parent 86c2ff58d4
commit 87f232b527
27 changed files with 213 additions and 243 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ class ConceptEvaluator(OneReturnValueEvaluator):
def eval(self, context, return_value):
sheerka = context.sheerka
concept = return_value.value.value
context.log(self.verbose_log, f"Evaluating concept {concept}.", self.name)
context.log(f"Evaluating concept {concept}.", self.name)
# If the concept that is requested is in the context(at least its name), drop the call.
# Why ?
@@ -32,11 +32,11 @@ class ConceptEvaluator(OneReturnValueEvaluator):
# The body should be 'property_a', and not a concept called 'a'
if context.obj and concept.name in context.obj.props:
value = context.obj.props[concept.name].value
context.log(self.verbose_log, f"{concept.name} is a property. Returning value '{value}'.", self.name)
context.log(f"{concept.name} is a property. Returning value '{value}'.", self.name)
return sheerka.ret(self.name, True, value, parents=[return_value])
evaluated = sheerka.evaluate_concept(context, concept, self.verbose_log)
evaluated = sheerka.evaluate_concept(context, concept)
if evaluated.key != concept.key:
# evaluated.key != concept.key means that we have transformed the concept