Another update for an Issue #287

This commit is contained in:
Miroslav Stampar
2012-12-12 14:22:24 +01:00
parent c3f20a136f
commit 921000bd87
2 changed files with 8 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ logging.addLevelName(CUSTOM_LOGGING.TRAFFIC_IN, "TRAFFIC IN")
LOGGER = logging.getLogger("sqlmapLog")
LOGGER_HANDLER = None
try:
import ctypes
LOGGER_HANDLER = ColorizingStreamHandler(sys.stdout)
@@ -31,7 +32,3 @@ FORMATTER = logging.Formatter("\r[%(asctime)s] [%(levelname)s] %(message)s", "%H
LOGGER_HANDLER.setFormatter(FORMATTER)
LOGGER.addHandler(LOGGER_HANDLER)
LOGGER.setLevel(logging.WARN)
def setLoggerHandler(handler):
LOGGER.handlers = []
LOGGER.addHandler(handler)