Commit 623f2ee5 authored by Randolph Busch's avatar Randolph Busch Committed by GitHub

add service result code to log (#544)

* add service result code to log

* add diagnostics to log output
Co-authored-by: default avatarRandolph Busch <randolph.busch@ticos.ch>
parent 750ef895
......@@ -156,8 +156,8 @@ class UASocketProtocol(asyncio.Protocol):
data = data.copy()
typeid = nodeid_from_binary(data)
if typeid == ua.FourByteNodeId(ua.ObjectIds.ServiceFault_Encoding_DefaultBinary):
self.logger.warning("ServiceFault from server received %s", context)
hdr = struct_from_binary(ua.ResponseHeader, data)
self.logger.warning("ServiceFault (%s, diagnostics: %s) from server received %s", hdr.ServiceResult.name, hdr.ServiceDiagnostics, context)
hdr.ServiceResult.check()
return False
return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment