pastebin - collaborative debugging tool
pastes.kpaste.net RSS


Untitled
Posted by Anonymous on Thu 19th Dec 2013 19:35
raw | new post

  1. twisted/web/http.py
  2. ----------
  3.          Log a request's result to the logfile, by default in combined log format.
  4.          """
  5. +        noisy = False
  6.          if hasattr(self, "logFile"):
  7. ----------
  8.                  self._escape(request.getHeader("user-agent") or "-"))
  9. -                self.logFile.write(line)
  10. +            if self.noisy:
  11. +                self.logFile.write(line)
  12. ----------
  13. twisted/internet/udp.py
  14. ----------
  15.          self._realPortNumber = skt.getsockname()[1]
  16. +        if self.protocol.noisy:
  17. +            log.msg("%s starting on %s"%(self.protocol.__class__, self._realPortNumber))
  18. -        log.msg("%s starting on %s"%(self.protocol.__class__, self._realPortNumber))
  19.          self.connected = 1
  20. ----------
  21.          """Cleans up my socket.
  22.          """
  23. -        log.msg('(Port %s Closed)' % self._realPortNumber)
  24. +        if self.protocol.noisy:
  25. +            log.msg('(Port %s Closed)' % self._realPortNumber)
  26.          self._realPortNumber = None
  27. ----------
  28. twisted/internet/tcp.py
  29. ----------
  30.          self._realPortNumber = skt.getsockname()[1]
  31. +        if self.factory.noisy:
  32. +            log.msg("%s starting on %s" % (self.factory.__class__, self._realPortNumber))
  33. -        log.msg("%s starting on %s" % (self.factory.__class__, self._realPortNumber))
  34.          # The order of the next 6 lines is kind of bizarre.  If no one
  35. ----------
  36. twisted/internet/protocol.py
  37. ----------
  38.      numPorts = 0
  39. -    noisy = True
  40. +    noisy = False
  41.      def doStart(self):
  42. ----------
  43.      numPorts = 0
  44. -    noisy = True
  45. +    noisy = False
  46.      def __getstate__(self):

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at