log
This commit is contained in:
parent
5d616fd920
commit
6e19ca602f
@ -21,6 +21,7 @@ class lvl:
|
|||||||
INFO = 20
|
INFO = 20
|
||||||
WARNING = 30
|
WARNING = 30
|
||||||
FAIL = 40
|
FAIL = 40
|
||||||
|
CRITICAL = 50
|
||||||
|
|
||||||
class SingleLevelFilter(logging.Filter):
|
class SingleLevelFilter(logging.Filter):
|
||||||
"""Filter for one level"""
|
"""Filter for one level"""
|
||||||
@ -50,7 +51,6 @@ class Log(object):
|
|||||||
error.log -> error
|
error.log -> error
|
||||||
Write all message on terminal too
|
Write all message on terminal too
|
||||||
"""
|
"""
|
||||||
logging.addLevelName(lvl.SUCCESS, "SUCCESS")
|
|
||||||
self.logger = logging.getLogger()
|
self.logger = logging.getLogger()
|
||||||
self.logger.setLevel(logging.DEBUG)
|
self.logger.setLevel(logging.DEBUG)
|
||||||
formatter = logging.Formatter('%(asctime)-15s :: %(levelname)s :: %(message)s')
|
formatter = logging.Formatter('%(asctime)-15s :: %(levelname)s :: %(message)s')
|
||||||
|
Reference in New Issue
Block a user