diff --git a/nomad/processing/base.py b/nomad/processing/base.py index 6d0ea09c7ad2d84e2c2510beeecb55d6d6a9e9ed..b3e4128c1c8f674a7a00fad71b59e972c16337a6 100644 --- a/nomad/processing/base.py +++ b/nomad/processing/base.py @@ -200,7 +200,7 @@ class Proc(Document, metaclass=ProcMetaclass): self.save() - def warning(self, *warnings, log_level=logging.warning, **kwargs): + def warning(self, *warnings, log_level=logging.WARNING, **kwargs): """ Allows to save warnings. Takes strings or exceptions as args. """ assert not self.completed diff --git a/nomad/processing/data.py b/nomad/processing/data.py index ff2a88c67ee289eff9f0ba5e7b9e417741ec83d7..8c83e0f35027073289267d5831aa7e4c8459f7f0 100644 --- a/nomad/processing/data.py +++ b/nomad/processing/data.py @@ -117,7 +117,7 @@ class Calc(Proc): logger = logger.bind( upload_id=self.upload_id, mainfile=self.mainfile, upload_hash=upload_hash, calc_hash=calc_hash, - archive_id='%s/%s' % (upload_hash, calc_hash), **kwargs) + archive_id=self.archive_id, **kwargs) return logger @@ -467,7 +467,7 @@ class Upload(Chord): calc.process() total_calcs += 1 except Exception as e: - self.warning( + self.error( 'exception while matching pot. mainfile', mainfile=filename, exc_info=e)