Skip to content

Commit 41a8415

Browse files
committed
Improve docs and MCP error logging
1 parent 9cbc07a commit 41a8415

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

docs/troubleshooting.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Troubleshooting
22

3-
## Server logs (stderr)
3+
## Logs (stderr)
44

5-
ECA works with clients (editors) sending and receiving messages to server, a process, you can start server with `--log-level debug` or `--verbose` which should log helpful information to `stderr` buffer like what is being sent to LLMs or what ECA is responding to editors, all supported editors have options to set the __server args__ to help with that and options to check the server logs.
5+
All supported editors have options to set the __server args__ to help with that and options to check the server logs.
66

77
To access the server logs:
88

@@ -22,6 +22,15 @@ To access the server logs:
2222

2323
`EcaShowLogs`
2424

25+
### Server logs
26+
27+
This controls what's logged by server on its actions, you can control to log more things via `--log-level debug` server arg.
28+
This should help log LLM outputs, and other useful stuff.
29+
30+
### Client<->Server logs
31+
32+
ECA works with clients (editors) sending and receiving messages to server, a process, you can start server `--verbose` which should log all jsonrpc communication between client and server to `stderr` buffer like what is being sent to LLMs or what ECA is responding to editors.
33+
2534
## Doctor command
2635

2736
`/doctor` command should log useful information to debug model used, server version, env vars and more.

src/eca/features/tools/mcp.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
:parameters (json/parse-string (.writeValueAsString obj-mapper (.inputSchema tool-client)) true)})
127127
(.tools (.listTools client))))
128128
(catch Exception e
129-
(logger/debug logger-tag "Could not list tools:" (.getMessage e))
129+
(logger/warn logger-tag "Could not list tools:" (.getMessage e))
130130
[])))
131131

132132
(defn ^:private list-server-prompts [^McpSyncClient client]
@@ -142,7 +142,7 @@
142142
(.arguments prompt-client))})
143143
(.prompts (.listPrompts client))))
144144
(catch Exception e
145-
(logger/debug logger-tag "Could not list prompts:" (.getMessage e))
145+
(logger/warn logger-tag "Could not list prompts:" (.getMessage e))
146146
[])))
147147

148148
(defn ^:private list-server-resources [^McpSyncClient client]
@@ -155,7 +155,7 @@
155155
:mime-type (.mimeType resource-client)})
156156
(.resources (.listResources client))))
157157
(catch Exception e
158-
(logger/debug logger-tag "Could not list resources:" (.getMessage e))
158+
(logger/warn logger-tag "Could not list resources:" (.getMessage e))
159159
[])))
160160

161161
(defn ^:private initialize-server! [name db* config on-server-updated]

0 commit comments

Comments
 (0)