Skip to content

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 force-pushed the feature/debug-option branch from 0cffb7b to ab263b2 Compare June 26, 2022 15:34
@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