code: def set_debug(self, set_to=True):
          
          if set_to:
              StreamHandler(sys.stdout).push_application()
              self._log.level = logbook.DEBUG
          self.debug = set_to
docs: Sets the capture to debug mode (or turns it off if specified).