code: def warningFailure(self, failure, swallow=True):
          
          if _canShortcutLogging(self.logCategory, WARN):
              if swallow:
                  return
              return failure
          warningObject(self.logObjectName(), self.logCategory,
              *self.logFunction(getFailureMessage(failure)))
          if not swallow:
              return failure
docs: Log a warning about a Twisted Failure. Useful as an errback handler:
          d.addErrback(self.warningFailure)
  
          @param swallow: whether to swallow the failure or not
          @type  swallow: bool