Comments (3)
Hi,
That's interesting; what kind of debug logs are you seeing?
Grepping for log::
in the repo, I see a couple warn!
, but that's about it. It's possible some dependencies do emit logs of their own though; emitting a lot of things at the DEBUG
level doesn't sound unreasonable.
The current logger implementation is also very basic, and doesn't offer much filtering. Something like flexi-logger should allow you to specify per-module levels, so you could only allow warnings and errors from cursive (and other dependencies), but see info logs from your own module.
from cursive.
Running the above example, I'm seeing logs from
- LinearLayout::required_size().
- TextArea::required_size()
- TextArea::soft_compute_rows()
- TextArea::draw()
I'm using tracing with tracing-subscriber and it has a feature 'env-filter' which allows you to set per-module logging levels. Without it I get spammed with debug messages from LinearLayout.
It seems like even when at the bottom of a ScrollView scrolling causes a redraw and triggers more debug messages. I think this is because the debug console is added as a layer on the current screen so scrolling the debug console causes the rest of the screen to be redrawn. I guess this didn't get caught cause only some views have debug messages in draw()
. Searching for log::debug
shows that only 3 views (LinearLayout, TextArea, and ListView) use debug messages at all . The only other parts of cursive that use log::debug
are the ncurses and pancurses backends.
Also, the reason that setting RUST_LOG=info
is ineffective is because CursiveLogger::enabled() is hardcoded to true, instead of checking the log level. There's even a TODO in CursiveLogger::init() for this.
I think this can be addressed by:
- changing CursiveLogger to set a log level by checking
RUST_LOG
or as an argument tocursive::logger::init()
- changing the debug console to use a new screen instead of just a layer on the current screen to avoid redrawing application and triggering lots of extra debug messages when scrolling
from cursive.
i experienced this today also, in the debug console, logs are flooded with cursive logs. Nice to see that this is being addressed. When might we see a new release with the fixed?
from cursive.
Related Issues (20)
- [FEATURE] StackView shouldn't layout and draw hidden layers HOT 6
- [FEATURE] Use default system color theme (or themeless widgets) HOT 2
- [FEATURE] `set_visible(false)` to hide a view and show it programatically later? HOT 2
- [BUG] `cursive_core::views::menu_popup::MenuPopup::scroll_down` loops infinitely if all children are disabled HOT 4
- [BUG] Cursive window borders contain gaps when viewed in Windows Terminal HOT 5
- Latest changes broke fullscreen HOT 2
- [FEATURE] Documentation of View::required_size() should mention when it is called. HOT 1
- [FEATURE] Gif previews for examples HOT 1
- [FEATURE] clear_all_callbacks() to removes previously applied bindings HOT 2
- [FEATURE] Allow Keyboard Remapping for In-App Navigation HOT 1
- API error HOT 6
- [BUG] ScrollView not scrolling down HOT 1
- [BUG] GitHub dependabot warnings from cursive-core dependencies HOT 1
- FromFront and FromBack should equal if the position of the layer is logically same if we count from back or from the front of the stack HOT 6
- [BUG] menubar example background doesn't refresh if not focussed HOT 1
- [BUG] TextView performance regression with LinearLayout HOT 1
- [BUG] Italic Effect with ncurses-backend HOT 2
- [BUG] Panic when resizing the Terminal too small HOT 1
- [BUG] Nerdfont is not being properly rendered HOT 2
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 cursive.