logging to widget example request #5287
Unanswered
sedan-cell
asked this question in
General
Replies: 1 comment
-
There is no dedicated log viewer widget or anything. I'd just watch the log with whatever method is appropriate in Rust code (filesystem watcher, callback for the logging system, whatever:-) and then append the message to some Text widget. How to update the UI best depends a lot on what you want to do and message volume. The simplest is to just append the message to a String in rust and to set that string on a TextEdit. A model would of course scale better to more log messages. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
if possible can an example be added showing how to connect a widget to a logger of somekind to write log messages to a text widget or rewrite a single line (label maybe?) with the newest log messages. no examples currently show and none in the docs that i see. tracing would be a good start (as its so common and recommended) but bare log is probably fine too.
Beta Was this translation helpful? Give feedback.
All reactions