def logger(self): """ Get the logger of the Calculation object, so that it also logs to the DB. :return: LoggerAdapter object, that works like a logger, but also has the 'extra' embedded """ from aiida.orm.utils.log import create_logger_adapter return create_logger_adapter(self._logger, self)
def __init__(self, node): """Construct the Parser instance. :param node: the `CalcJobNode` that contains the results of the executed `CalcJob` process. """ from aiida.common.log import AIIDA_LOGGER from aiida.orm.utils.log import create_logger_adapter self._logger = create_logger_adapter(AIIDA_LOGGER.getChild('parser').getChild(self.__class__.__name__), node) self._node = node self._outputs = extendeddicts.AttributeDict()