mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
colourize the whole log message
This commit is contained in:
parent
31571e6e2d
commit
ff6ca6fb1a
|
@ -125,12 +125,13 @@ class ColorizingStreamHandler(logging.StreamHandler):
|
|||
|
||||
def format(self, record):
|
||||
message = logging.StreamHandler.format(self, record)
|
||||
if self.is_tty:
|
||||
# Don't colorize any traceback
|
||||
parts = message.split('\n', 1)
|
||||
parts[0] = self.colorize(parts[0], record)
|
||||
message = '\n'.join(parts)
|
||||
return message
|
||||
#if self.is_tty:
|
||||
# # Don't colorize any traceback
|
||||
# parts = message.split('\n', 1)
|
||||
# parts[0] = self.colorize(parts[0], record)
|
||||
# message = '\n'.join(parts)
|
||||
#return message
|
||||
return self.colorize(message, record)
|
||||
|
||||
def main():
|
||||
root = logging.getLogger()
|
||||
|
|
Loading…
Reference in New Issue
Block a user