code: def log(self, message, type='notice'):
          
          if self.logger and not callable(self.logger):
              raise ValueError(u"Invalid logger set, must be a callable")
          if self.verbose and self.logger:
              self.logger(message, type)
docs: Logs a message (eventually, override to do something more clever).