MCPcopy Index your code
hub / github.com/qilingframework/qiling / format

Method format

qiling/log.py:58–73  ·  view source on GitHub ↗
(self, record: LogRecord)

Source from the content-addressed store, hash-verified

56 return thread
57
58 def format(self, record: LogRecord):
59 # In case we have multiple formatters, we have to keep a copy of the record.
60 record = copy.copy(record)
61
62 # early logging may access ql.os when it is not yet set
63 try:
64 cur_thread = self.ql.os.thread_management.cur_thread
65 except AttributeError:
66 tid = ''
67 else:
68 tid = self.get_thread_tag(str(cur_thread))
69
70 level = self.get_level_tag(record.levelname)
71 record.levelname = f'{level} {tid}'
72
73 return super().format(record)
74
75
76class QlColoredFormatter(QlBaseFormatter):

Callers 15

read_msg_contentMethod · 0.80
deal_with_msgMethod · 0.80
read_mappingMethod · 0.80
get_common_attrMethod · 0.80
loadMachoMethod · 0.80
loadSegment64Method · 0.80
loadUnixThreadMethod · 0.80
loadStackMethod · 0.80
push_stack_stringMethod · 0.80
__init__Method · 0.80
__str__Method · 0.80
__str__Method · 0.80

Calls 2

get_thread_tagMethod · 0.95
get_level_tagMethod · 0.95

Tested by 1

wrappedMethod · 0.64