-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Add CIDER Log Mode #3352
Add CIDER Log Mode #3352
Conversation
This PR is for the NREPL side: clojure-emacs/cider-nrepl#773 |
I will look into the failing tests soon ... (or once we decided what to do with Logview mode) |
We discussed this over Slack and agreed it's a good idea. Naming - pending. :-)
It's fine. We can tweak this later if needed.
I haven't used it, but if it's built-in I don't have issues with it.
Both approaches have their pros and cos. I don't mind the main menu myself, but I also I rarely use menus myself. They are handy when exploring something new, though, that's why I always try to make them detailed. Again, it's not something very important right now. I'm a big believer in small iteration over trying to get everything perfect from the first try. |
I propose Glass 🍺 One can view things (logs here) through a window, or magnifying glass, telescope... seems semantically close. |
@@ -12,7 +12,7 @@ | |||
;; Maintainer: Bozhidar Batsov <bozhidar@batsov.dev> | |||
;; URL: http://www.github.com/clojure-emacs/cider | |||
;; Version: 1.7.0 | |||
;; Package-Requires: ((emacs "26") (clojure-mode "5.16.0") (parseedn "1.0.6") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2")) | |||
;; Package-Requires: ((emacs "26") (clojure-mode "5.16.0") (parseedn "1.0.6") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (logview "0.16.1") (transient "0.4.1")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbatsov I added this for now here to make the tests pass. Is there a better way to optionally add them and have it installed on CircleCI? I added transient here as well. It comes with newer Emacsen, but the tests running on the older versions need it installed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For CI purposes you can just add deps to Eldev, but I think it's fine to have them here given that those are runtime deps. (e.g. seq
is also built-in)
8d5b4b5
to
cf08693
Compare
@bbatsov @vemv I'm trying to fix the lint issues. The last ones left are:
Do you know what is the best way to fix them? Should I create a set of non-interactive functions for all of those? This seems a bit tedious. |
(IDK) |
@bbatsov Alright, I fixed the lint issues. Since I moved some things around, let me run with this for a couple of days and let's merge it next week. |
Sure! |
@bbatsov I did not notice anything suspicious in the last days running this, so I would say let's merge it? |
Done! |
Perfect. Thank you and @vemv once again! |
@r0man Thank you for another fantastic contribution! 🙇 Btw, I noticed the keybindings a bit too late, but we can't really use something like |
I didn't realize this dependency is only on MELPA (see #3365), which breaks the CIDER build on NonGNU ELPA. We might have to make this dep optional until that problem gets resolved. |
Hello CIDER team,
this PR adds CIDER log mode. CIDER Log Mode allows you to capture, debug, inspect and view log events emitted by Java logging frameworks. The captured log events can be searched, streamed to the client, pretty printed and are integrated with the CIDER Inspector and Stacktrace Mode.
How to try it out?
Install the CIDER middleware
cider-log
branch of cider-nrepllein do clean, inline-deps && lein with-profile +plugin.mranderson/config install
Install the CIDER Emacs mode
cider-log
branch of ciderUsing the Emacs mode
M-x cider-jack-in
M-x cider-log
to open the main menues
to search log events, followed bys
to perform a search*cider-log*
buffer will open. This is initially empty but will receive log events once you start logging somethingcider.nrepl.middleware.log-test
and run the tests to emit log events*cider-log*
bufferRET
, pretty-printedF
, and opened in the stacktrace navigatorE
(if there are any exceptions)logging.adoc
file for more information.Open questions
cider.log
namespace to a separate repository. Similar to what we did with haystack. So we need a good name for it. Any ideas?cider-log
menu working. I was thinking of even getting rid of the main menu and only use thecider-log-framework
,cider-log-appender
,cider-log-consumer
andcider-log-event
menus. On the other hand the main menu makes things more discover-able. What do you think?Thanks
Finally a big thanks to @rafaeldff who showed me the log capturing in his private devtools and supported me on this.
Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
eldev test
)eldev lint
) which is based onelisp-lint
and includescheckdoc
, check-declare, packaging metadata, indentation, and trailing whitespace checks.Thanks!
If you're just starting out to hack on CIDER you might find this section of its
manual extremely useful.