runtime/WAMP : was 'Added time print on session left.' from dporopat. Purpose is to log (dis/re)connection, to help debugging connection problem
authorEdouard Tisserant
Thu, 11 Jan 2018 13:02:09 +0100
changeset 1899 ff4410112b67
parent 1898 d2dbdeffc426
child 1900 9d1547578f55
runtime/WAMP : was 'Added time print on session left.' from dporopat. Purpose is to log (dis/re)connection, to help debugging connection problem
runtime/WampClient.py
--- a/runtime/WampClient.py	Thu Jan 11 12:48:49 2018 +0100
+++ b/runtime/WampClient.py	Thu Jan 11 13:02:09 2018 +0100
@@ -25,7 +25,7 @@
 from __future__ import absolute_import
 from __future__ import print_function
 import json
-
+import time
 import os
 import json
 from autobahn.twisted import wamp
@@ -113,11 +113,11 @@
 
 class ReconnectingWampWebSocketClientFactory(WampWebSocketClientFactory, ReconnectingClientFactory):
     def clientConnectionFailed(self, connector, reason):
-        print(_("WAMP Client connection failed .. retrying .."))
+        print _("WAMP Client connection failed (%s) .. retrying .." %time.ctime())
         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
 
     def clientConnectionLost(self, connector, reason):
-        print(_("WAMP Client connection lost .. retrying .."))
+        print _("WAMP Client connection lost (%s) .. retrying .." %time.ctime())
         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)