This commit is contained in:
Steve Nyemba 2022-08-31 17:34:43 -05:00
parent 7af3c3db6a
commit 4398212caf
1 changed files with 4 additions and 3 deletions

View File

@ -77,10 +77,11 @@ class Learner(Process):
try: try:
_context = self.info['context'] _context = self.info['context']
_label = self.info['info'] if 'info' in self.info else _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}) _args = dict({'ndx':self.ndx,'module':self.name,'table':self.info['from'],'context':_context,'info':_label,**_args})
if hasattr(self,'logger') : if 'logger' in self.store :
self.logger.write(_args) 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 self.ndx += 1
# if hasattr(logger,'close') : # if hasattr(logger,'close') :
# logger.close() # logger.close()