From 4398212cafec8c8454b25ea85a4d06c3d2f154b9 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 31 Aug 2022 17:34:43 -0500 Subject: [PATCH] bug fix --- data/maker/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index bc5d9cc..cdc48e2 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -77,10 +77,11 @@ class Learner(Process): try: _context = self.info['context'] _label = self.info['info'] if 'info' in self.info else _context - # logger = transport.factory.instance(**self.store['logger']) if 'logger' in self.store else transport.factory.instance(provider=transport.providers.CONSOLE,context='write',lock=True) + # logger = _args = dict({'ndx':self.ndx,'module':self.name,'table':self.info['from'],'context':_context,'info':_label,**_args}) - if hasattr(self,'logger') : - self.logger.write(_args) + if 'logger' in self.store : + logger = transport.factory.instance(**self.store['logger']) if 'logger' in self.store else transport.factory.instance(provider=transport.providers.CONSOLE,context='write',lock=True) + logger.write(_args) self.ndx += 1 # if hasattr(logger,'close') : # logger.close()