chiark / gitweb /
crashing and msgs
[hippotat.git] / hippotat / __init__.py
index 43f4a49b157329312e64e1a0ee5e559190d15aa4..3e8649ae1e122f7b4252ad4dbc4453e54ffca673 100644 (file)
@@ -49,7 +49,7 @@ log = twisted.logger.Logger()
 def log_debug(dflag, msg, idof=None, d=None):
   #print('---------------->',repr((dflag, msg, idof, d)), file=sys.stderr)
   if idof is not None:
-    msg = '[%d] %s' % (id(idof), msg)
+    msg = '[%#x] %s' % (id(idof), msg)
   if d is not None:
     d = d[0:64]
     d = _hex_codec(d)[0].decode('ascii')
@@ -286,7 +286,8 @@ _crashing = False
 def crash(err):
   global _crashing
   _crashing = True
-  print('CRASH ', err, file=sys.stderr)
+  print('========== CRASH ==========', err,
+        '===========================', file=sys.stderr)
   try: reactor.stop()
   except twisted.internet.error.ReactorNotRunning: pass