This commit is contained in:
sidya82 2015-04-02 13:51:24 +02:00
parent 9030013c68
commit 9216f5ed45
1 changed files with 4 additions and 0 deletions

View File

@ -4,9 +4,11 @@
"""
import logging
import os
from logging.handlers import RotatingFileHandler
class bcolors:
"""
Define constant color value for different level
@ -62,6 +64,8 @@ class Log(object):
error.log -> error
Write all message on terminal too
"""
if not os.path.exists("log"):
os.makedirs("log")
self.logger = logging.getLogger()
self.logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s :: %(levelname)s :: %(message)s')