Comments (5)
Hi @vemv,
I think this can also happen when stacktraces are printed. I don't have strong opinions and I'm fine with rendering it on a single line. We also truncate long messages to not bring Emacs down, with the idea that you can inspect them if you really want to.
from cider.
@vemv I don't follow, what do you mean by "I've noticed that the newlines may be our fault sometimes".
I meant, maybe somewhere in logjam we use pr-str instead of str for exceptions.
But I was probably wrong in saying that, the pr-str
or str
is not performed by logjam, but by either the logging library or the user application.
. By default we could show only the single/first line, but if the user presses a key (maybe TAB), the log line would expand and show on multiple lines.
This would sgtm! Assuming it would be reasonably cheap and would not compromise anything.
I believe I changed them to also be printed on multiple lines.
Yes, correct, that would be good reasoning for trimming the lines, guilt-free :)
One last consideration: if we are to remove newlines, we shouldn't just remove the newlines, but also truncate everything after the first newline.
The reason is that long lines are known to cause Emacs slowness.
from cider.
Thanks!
Good idea on truncating. We could have options if anyone wanted to opt out.
I've noticed that the newlnes may be our fault sometimes:
that output can reproduced with a simple (c.t.l/error :foo (ex-info "a" {}))
.
Maybe we could be using pr-str / str better somewhere in Logjam, idk.
from cider.
@vemv I don't follow, what do you mean by "I've noticed that the newlines may be our fault sometimes".
Another idea that came to my mind is: Maybe it's actually nice to see the printed exception sometimes, or the "thing" that spans multiple lines. By default we could show only the single/first line, but if the user presses a key (maybe TAB), the log line would expand and show on multiple lines. That key can be a toggle, you press it again and it goes back to a single line. This could be useful if you are fishing for something in the logs.
Exceptions are probably better viewed in the stacktrace inspector, but for long strings that could be useful. I think you can also jump into the inspector and view long strings there. I believe I changed them to also be printed on multiple lines.
from cider.
Thanks for the clarification. Yes, truncating according to cider-log-max-message-length
seems fine.
from cider.
Related Issues (20)
- Errors when auto complete called in Cljs repl HOT 2
- `sesman-use-friendly-sessions` not respected HOT 6
- Use pretty-print formatting inside cider-inspect HOT 1
- Support bookmarks to Cider REPLs HOT 2
- Spinner support while running tests
- can't use Clojure 1.12 `add-lib` when `cider-enrich-classpath` set to `t` HOT 8
- refresh ops shouldn't have a timeout HOT 3
- `cider-enable-flex-completion` is not a sufficient replacement for `cider-company-enable-fuzzy-completion` HOT 26
- "Not a tramp file name" when running cider-connect HOT 1
- `cider-locals` - false positives HOT 4
- Wrong previous-line behavior while overlay is active
- Change `cider-interactive-eval-override` to make it more usable HOT 5
- Stack overflow when using CIDER with datahike and sail HOT 5
- Integration tests are broken HOT 1
- False assumption in cider-popup-buffer-display (with fix) HOT 1
- Update cheatsheet HOT 5
- In CLJC mode, C-x C-e evaluates against multiple REPLs simultaneously HOT 1
- Test reporter can't handle interrupted test HOT 2
- Current way of displaying cheatsheet is inconvenient HOT 3
- Allow inspecting a class that is used as a ^TypeTag HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cider.