Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--debug option for printing debug info #10

Merged
merged 6 commits into from
Jun 27, 2022
Merged

--debug option for printing debug info #10

merged 6 commits into from
Jun 27, 2022

Conversation

athos
Copy link
Owner

@athos athos commented Jun 26, 2022

Resolves #9.

After this being merged, Trenchman prints debug info (i.e. messages communicated between the client and server) with the —debug option:

$ trench --debug
[DEBUG:SEND] map["id":"init" "op":"clone"]
[DEBUG:RECV] map["id":"init" "new-session":"cee88e31-b813-4fd4-8fc2-33fa085c7a0c" "session":"none" "status":["done"]]
[DEBUG:SEND] map["op":"describe"]
[DEBUG:RECV] map["id":"unknown" "ops":map["clone":map[] "close":map[] "complete":map[] "describe":map[] "eldoc":map[] "eval":map[] "info":map[] "load-file":map[] "lookup":map[] "ls-sessions":map[]] "session":"none" "status":["done"] "versions":map["babashka":"0.8.156" "babashka.nrepl":"0.0.6-SNAPSHOT"]]
user=> (map inc [1 2 3])
[DEBUG:SEND] map["code":"(map inc [1 2 3])" "id":"a524995d-a048-4b43-869a-db23185c90c4" "ns":"user" "op":"eval" "session":"cee88e31-b813-4fd4-8fc2-33fa085c7a0c"]
[DEBUG:RECV] map["id":"a524995d-a048-4b43-869a-db23185c90c4" "ns":"user" "session":"cee88e31-b813-4fd4-8fc2-33fa085c7a0c" "value":"(2 3 4)"]
[DEBUG:RECV] map["id":"a524995d-a048-4b43-869a-db23185c90c4" "session":"cee88e31-b813-4fd4-8fc2-33fa085c7a0c" "status":["done"]]
(2 3 4)
user=>

@athos athos merged commit ad925c5 into main Jun 27, 2022
@athos athos deleted the feature/debug-option branch June 27, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --debug option to log messages for debug
1 participant