mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Minor refactoring
This commit is contained in:
parent
053b7d12b4
commit
14b7e655a9
5 changed files with 3 additions and 10 deletions
|
|
@ -6,11 +6,9 @@ See the file 'doc/COPYING' for copying permission
|
|||
"""
|
||||
|
||||
import logging
|
||||
import StringIO
|
||||
import sys
|
||||
|
||||
from lib.core.enums import CUSTOM_LOGGING
|
||||
from thirdparty.ansistrm.ansistrm import ColorizingStreamHandler
|
||||
|
||||
logging.addLevelName(CUSTOM_LOGGING.PAYLOAD, "PAYLOAD")
|
||||
logging.addLevelName(CUSTOM_LOGGING.TRAFFIC_OUT, "TRAFFIC OUT")
|
||||
|
|
@ -20,7 +18,8 @@ LOGGER = logging.getLogger("sqlmapLog")
|
|||
|
||||
LOGGER_HANDLER = None
|
||||
try:
|
||||
import ctypes
|
||||
from thirdparty.ansistrm.ansistrm import ColorizingStreamHandler
|
||||
|
||||
LOGGER_HANDLER = ColorizingStreamHandler(sys.stdout)
|
||||
LOGGER_HANDLER.level_map[logging.getLevelName("PAYLOAD")] = (None, "cyan", False)
|
||||
LOGGER_HANDLER.level_map[logging.getLevelName("TRAFFIC OUT")] = (None, "magenta", False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue