MCPcopy Create free account
hub / github.com/microsoft/debugpy / write

Function write

src/debugpy/common/log.py:125–143  ·  view source on GitHub ↗
(level, text, _to_files=all)

Source from the content-addressed store, hash-verified

123
124
125def write(level, text, _to_files=all):
126 assert level in LEVELS
127
128 t = timestamp.current()
129 format_string = "{0}+{1:" + timestamp_format + "}: "
130 prefix = format_string.format(level[0].upper(), t)
131
132 text = getattr(_tls, "prefix", "") + text
133 indent = "\n" + (" " * len(prefix))
134 output = indent.join(text.split("\n"))
135 output = prefix + output + "\n\n"
136
137 with _lock:
138 if _to_files is all:
139 _to_files = _files.values()
140 for file in _to_files:
141 file.write(level, output)
142
143 return text
144
145
146def write_format(level, format_string, *args, **kwargs):

Callers 1

write_formatFunction · 0.70

Calls 3

valuesMethod · 0.80
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…