from time import strftime
def deco(func):
def LogOutput(*args, **kwargs):
print("时间节点:" + strftime("%Y-%m-%d,%H:%M:%S"))
print("函数名称:" + func.__name__)
func(*args, **kwargs)
return LogOutput
@deco
def Func1():
print("Func1被调用!")
@deco
def Func2():
print("Func2被调用!")
Func1()
Func2()