MCPcopy Index your code
hub / github.com/bugy/script-server / __log

Method __log

src/execution/logging.py:51–64  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

49 self.opened = True
50
51 def __log(self, text):
52 if not self.opened:
53 LOGGER.exception('Attempt to write to not opened logger')
54 return
55
56 if not self.log_file:
57 return
58
59 try:
60 if text is not None:
61 self.log_file.write(text.encode(ENCODING))
62 self.log_file.flush()
63 except:
64 LOGGER.exception("Couldn't write to the log file")
65
66 def _close(self):
67 try:

Callers 2

on_nextMethod · 0.95
write_lineMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected