Exemplo n.º 1
0
def info(str):
	if log_level >= INFO:
		return "["+cl.green("INFO")+"] "+str
	else:
		return ""
Exemplo n.º 2
0
FATAL = 1
INFO = 2
DEBUG = 3

log_level = DEBUG

def info(str):
	if log_level >= INFO:
		return "["+cl.green("INFO")+"] "+str
	else:
		return ""

def debug(str):
	if log_level >= DEBUG:
		return "["+cl.brown("DEBUG")+"] "+str
	else:
		return ""


def fatal(str):
	if log_level >= FATAL:
		return "["+cl.red("FATAL")+"] "+str
	else:
		return ""



if __name__ == '__main__':
	print cl.green("test")