To continue my monologue: For future reference, it is worth noting
that the code previously posted will not work for reconnecting clients
since only the first connection receives the modified logPrefix
method. A better approach is to bind logPrefix() in
onClientConnected() to ensure it is bound for
I was able to modify the logstring for the TCP query by following a
similar approach to what I did to the UDP logger:
def logPrefix(self):
return self.connection.transport.protocol.__class__.__name__ +
", " + str(self.id)
def startClient(self):
self.f = self.factory(self,