nrepl

Saket 2023-09-07T06:18:49.012759Z

How can I enable operation logging in nrepl server? Our clojure application is hosted on an AWS EC2 instance, that multiple user connect via ssh. As it's a production machine, we want access to the repl and operations executed on it to be logged.

vemv 2023-09-07T21:07:50.887299Z

Taking a quick look at the nrepl codebase, it doesn't appear to have logging. Which is a sensible choice, because it shouldn't conflict with users' dependency trees or choices of logging framework. It's probably reasonably easy to add your own middleware to your application's nrepl stack. That piece of middleware would log e.g. incoming and outcoming messages. Be mindful of passwords or huge data - anything you would not want to log.

bozhidar 2023-09-08T07:36:09.365469Z

Yeah, there's no built-in logging. We discussed this in the past and some prototyping work was done, but nothing more https://github.com/nrepl/nrepl/issues/85

Saket 2023-09-08T10:19:41.000989Z

Thanks for the response @vemv and @bozhidar Middleware makes sense. Also, we want to log just the requests for now, so the size of the log is not an issue. Thanks for the heads up though. 😃

🙌 1
2023-09-07T20:35:45.017149Z

Hey folks, I'm using a TTY nREPL server, when I connect remotely I can't send a CTRL+C or CRTL+D to exit the nREPL connection, is there any way to do it?

2023-09-07T20:56:07.258599Z

those commands are not really things that are transmitted over the wire from client to server, depending on how you terminal is setup client may not even get ctrl+d, it may just get the end of stream signal when reading from stdin

🤔 1
2023-09-07T20:56:27.609709Z

so I would start by looking at the clients you are using (nc, telnet) and the terminal you are using them in

👍 1
2023-09-07T20:36:47.202009Z

with nc and telnet I can't close my session sending these signals, is there any reason for this?