MCPcopy Create free account
hub / github.com/langchain-ai/deepagents / _read_log_file

Method _read_log_file

libs/code/deepagents_code/server.py:422–441  ·  view source on GitHub ↗

Read the server log file contents. Returns: Log file contents as a string (may be empty).

(self)

Source from the content-addressed store, hash-verified

420 return self._process is not None and self._process.poll() is None
421
422 def _read_log_file(self) -> str:
423 """Read the server log file contents.
424
425 Returns:
426 Log file contents as a string (may be empty).
427 """
428 if self._log_file is None:
429 return ""
430 try:
431 self._log_file.flush()
432 return Path(self._log_file.name).read_text(
433 encoding="utf-8", errors="replace"
434 )
435 except OSError:
436 logger.warning(
437 "Failed to read server log file %s",
438 self._log_file.name,
439 exc_info=True,
440 )
441 return ""
442
443 async def start(
444 self,

Callers 1

wait_for_graph_readyMethod · 0.95

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected