Skip to content

Commit

Permalink
LIU-65: Make recommended changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
davepallot committed Jul 7, 2021
1 parent e579c75 commit 2f6fe91
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions daliuge-engine/dlg/manager/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ def __init__(self, sessionId):
self.sessionId = sessionId

def filter(self, record):
if hasattr(record, 'session_id'):
return record.session_id == self.sessionId
return False
return getattr(record, 'session_id', None) == self.sessionId

fmt = '%(asctime)-15s [%(levelname)5.5s] [%(threadName)15.15s] '
fmt += '[%(session_id)10.10s] [%(drop_uid)10.10s] '
fmt += '[%(drop_uid)10.10s] '
fmt += '%(name)s#%(funcName)s:%(lineno)s %(message)s'
fmt = logging.Formatter(fmt)
fmt.converter = time.gmtime
Expand Down

0 comments on commit 2f6fe91

Please sign in to comment.