Commit 09f5def8 authored by Ad Schellevis's avatar Ad Schellevis

additional logging

parent f09c1927
...@@ -140,6 +140,8 @@ class HandlerClient(threading.Thread): ...@@ -140,6 +140,8 @@ class HandlerClient(threading.Thread):
""" """
result = '' result = ''
exec_command = '' exec_command = ''
exec_action = ''
exec_params = ''
try: try:
# receive command, maximum data length is 4k... longer messages will be truncated # receive command, maximum data length is 4k... longer messages will be truncated
data = self.connection.recv(4096) data = self.connection.recv(4096)
...@@ -170,7 +172,12 @@ class HandlerClient(threading.Thread): ...@@ -170,7 +172,12 @@ class HandlerClient(threading.Thread):
self.connection.sendall('%s\n'%result) self.connection.sendall('%s\n'%result)
except: except:
print (traceback.format_exc()) print (traceback.format_exc())
syslog.syslog(syslog.LOG_ERR,'unable to sendback response [%s] for [%s], message was %s'%(result,exec_command ,traceback.format_exc())) syslog.syslog(syslog.LOG_ERR,
'unable to sendback response [%s] for [%s][%s][%s], message was %s'%(result,
exec_command,
exec_action,
exec_params ,
traceback.format_exc()))
finally: finally:
self.connection.close() self.connection.close()
......
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