fakessh: improve logging slightly.
Makes it easier to match up reads/writes across log files by using message byte count
This commit is contained in:
parent
fb9ce1054c
commit
769ece2514
|
@ -163,12 +163,13 @@ class Process(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
data = msg.unpickle()
|
data = msg.unpickle()
|
||||||
IOLOG.debug('%r._on_stdin(%r)', self, data)
|
|
||||||
|
|
||||||
if data == mitogen.core._DEAD:
|
if data == mitogen.core._DEAD:
|
||||||
|
IOLOG.debug('%r._on_stdin() -> %r', self, data)
|
||||||
self.pump.close()
|
self.pump.close()
|
||||||
else:
|
return
|
||||||
self.pump.write(data)
|
|
||||||
|
IOLOG.debug('%r._on_stdin() -> len %d', self, len(data))
|
||||||
|
self.pump.write(data)
|
||||||
|
|
||||||
def _on_control(self, msg):
|
def _on_control(self, msg):
|
||||||
if msg != mitogen.core._DEAD:
|
if msg != mitogen.core._DEAD:
|
||||||
|
@ -195,7 +196,7 @@ class Process(object):
|
||||||
self.router.broker.shutdown()
|
self.router.broker.shutdown()
|
||||||
|
|
||||||
def _on_pump_receive(self, s):
|
def _on_pump_receive(self, s):
|
||||||
IOLOG.info('%r._on_pump_receive()', self)
|
IOLOG.info('%r._on_pump_receive(len %d)', self, len(s))
|
||||||
self.stdin.put(s)
|
self.stdin.put(s)
|
||||||
|
|
||||||
def _on_pump_disconnect(self):
|
def _on_pump_disconnect(self):
|
||||||
|
|
Loading…
Reference in New Issue