Merge branch 'feat/6-log-viewer' into integration/v1.2.0
# Conflicts: # bcc_core.py # tests/test_core.py
This commit is contained in:
+19
@@ -1314,6 +1314,25 @@ def diagnostics_text(name: str, data: dict) -> str:
|
||||
return "\n".join(L)
|
||||
|
||||
|
||||
def server_log_path(name: str) -> Path | None:
|
||||
"""
|
||||
The platform-specific Claude Desktop MCP server log file for `name`, or
|
||||
None if it doesn't exist yet (nothing has been logged for this server).
|
||||
|
||||
macOS : ~/Library/Logs/Claude/mcp-server-<name>.log (one file per server)
|
||||
Windows: %APPDATA%\\Claude\\logs\\mcp.log (one shared file)
|
||||
Other platforms: Claude Desktop doesn't ship a log in a known location -> None.
|
||||
"""
|
||||
if sys.platform == "darwin":
|
||||
p = Path.home() / "Library" / "Logs" / "Claude" / f"mcp-server-{name}.log"
|
||||
elif sys.platform.startswith("win"):
|
||||
appdata = Path(os.environ.get("APPDATA", Path.home() / "AppData" / "Roaming"))
|
||||
p = appdata / "Claude" / "logs" / "mcp.log"
|
||||
else:
|
||||
return None
|
||||
return p if p.is_file() else None
|
||||
|
||||
|
||||
_STDERR_CAP = 4096 # bytes
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user