make baseclient work without mlzlog

The used logger can now be configured from caller. This allows
for example to use NicosLogger when imported from NICOS.

+ fix a problem when connections was lost

Change-Id: I8496ba11ad467749493751b49c4e36dd739892ab
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21477
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2019-10-29 11:50:45 +01:00
parent 679559c1e7
commit 98f87f1306
2 changed files with 24 additions and 8 deletions

View File

@ -30,7 +30,10 @@ import threading
from collections import deque
from os import path
import mlzlog
try:
import mlzlog
except ImportError:
pass # has to be fixed in case this file is used again
from secop.protocol.interface import decode_msg, encode_msg_frame, get_msg
from secop.protocol.messages import DESCRIPTIONREQUEST, EVENTREPLY