def log(self, status='info', s=''): if not s: return if self.verbose >= 1: try: log = logger.__getattribute__(status) except Exception: logger.error('logger not have attribute %s' % status) log(s) return
def log(self, level, message): ip = self.request.remote_ip logger.__getattribute__(level)("{}@{}: {}".format(self.username, ip, message))
def log(self, level, message): ip = self.request.remote_ip logger.__getattribute__(level)("{}@{}: {}".format( self.username, ip, message))