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
@@ -47,7 +47,7 @@ class AddConceptEvaluator(OneReturnValueEvaluator):
isinstance(return_value.value.value, DefConceptNode)
def eval(self, context, return_value):
context.log(self.log, "Adding a new concept", self.name)
context.log("Adding a new concept", self.name)
def_concept_node = return_value.value.value
sheerka = context.sheerka
@@ -86,10 +86,10 @@ class AddConceptEvaluator(OneReturnValueEvaluator):
sheerka.is_success(def_concept_node.definition):
concept.bnf = def_concept_node.definition.value.value
ret = sheerka.create_new_concept(context, concept, self.verbose_log)
ret = sheerka.create_new_concept(context, concept)
if not ret.status:
error_cause = sheerka.value(ret.body)
context.log(self.log, f"Failed to add concept '{concept.name}'. Reason: {error_cause}", self.name)
context.log(f"Failed to add concept '{concept.name}'. Reason: {error_cause}", self.name)
return sheerka.ret(self.name, ret.status, ret.value, parents=[return_value])
@staticmethod