test_msg.py
Go to the documentation of this file.
1 
2 class test_msg:
3 
4  level=0 # level [0,1,2,3] = [debug,info,warning,error]
5 
6  def __init__(self):
7  pass
8 
9  @classmethod
10  def debug(cls,msg=''):
11  if int(cls.level)<=0:
12  print '\033[94m[DEBUG] \033[00m',msg
13 
14  @classmethod
15  def info(cls,msg=''):
16  if int(cls.level)<=1:
17  print '\033[92m[INFO] \033[00m',msg
18 
19  @classmethod
20  def warning(cls,msg=''):
21  if int(cls.level)<=2:
22  print '\033[95m[WARNING]\033[00m',msg
23 
24  @classmethod
25  def error(cls,msg=''):
26  if int(cls.level)<=3:
27  print '\033[91m[ERROR] \033[00m',msg
28 
29 debug = test_msg.debug
30 info = test_msg.info
31 warning = test_msg.warning
32 error = test_msg.error
33 
def error(cls, msg='')
Definition: test_msg.py:25
def info(cls, msg='')
Definition: test_msg.py:15
def debug(cls, msg='')
Definition: test_msg.py:10
def warning(cls, msg='')
Definition: test_msg.py:20
def __init__(self)
Definition: test_msg.py:6