Usage with tracing #98
Replies: 7 comments
-
The fix that I can guess right now is to move the code that locks the The reason I encountered the same issue even after setting up EDIT:- Another option that is related to sending data only after the pager has been initialized is to use hooks(#95) which are planned. I can't give you any pointers right now as I haven't started working on it but once I get them landed you can hook a function to send data to the pager when the ui has been loaded. |
Beta Was this translation helpful? Give feedback.
-
Perhaps the If moving the current logic causes backward compatibility issues, then I wouldn't want that. And I can live with the solutions I have now. But I was wondering if there was something my code could be doing to avoid the |
Beta Was this translation helpful? Give feedback.
-
Well I guess the only solution that I see is to move the code that locks stdout to where we draw the initial UI. But I wanna know that if a program that only prints to stdout print after the UI is drawn (with Even if we decide to the program's output via minus, how can we get the exact data that it sent to the stdout without having some sort of API. You had to implement |
Beta Was this translation helpful? Give feedback.
-
Termimad has two methods, |
Beta Was this translation helpful? Give feedback.
-
I didn't get what exactly you want. You didn't answer the questions that I raised in my previous comment. |
Beta Was this translation helpful? Give feedback.
-
My apologies. I think you are right... there is no way to do this without an API. I don't know why, but I had it in my head that you already had some bit of magic somewhere that intercepted stdout. Sorry for the confusion and for wasting your time. Thanks for the discussion, and thanks for all the work you have done on this code. |
Beta Was this translation helpful? Give feedback.
-
Ah! no thanks buddy.🙂. I am closing the discussion as I hope that you understand the problems with implementing what you want. Feel free to ask questions whenever you like. |
Beta Was this translation helpful? Give feedback.
-
Based on #66 , there is an apparent issue with using the
tracing
andtracing-subscriber
crates:To get
tracing-subscriber
to work without blocking, I had to use with_writer and pass in astd::io::Write
trait object, such as this:Is there a way to avoid sending data to minus before initialization? Should a tokio task issue a
yield_now()
as the first thing it does?Beta Was this translation helpful? Give feedback.
All reactions