def newFunc(*args, **args2): t0 = time.time() cglog.getlogger().debug("@%s, {%s} start" % (time.strftime("%X", time.localtime()), func.__name__)) back = func(*args, **args2) cglog.getlogger().debug("@%s, {%s} end" % (time.strftime("%X", time.localtime()), func.__name__)) cglog.getlogger().debug("@%.3fs taken for {%s}" % (time.time() - t0, func.__name__)) return back
def log(self, msg, *args): cglog.getlogger().info(msg, *args)
def dlog(self, msg, *args): cglog.getlogger().debug(msg, *args)