How to capture stdout and stderr? #345
Unanswered
HuakunShen
asked this question in
Q&A
Replies: 1 comment
-
So under the hood, I initialize the console stuff with op_print which goes directly to stdio I think the easiest way would be to replace that op with one that can write to a string buffer instead. It's come up at least once before so I may just include it as a feature in the next release I'll replace op_print with one that prints to an object in the store that can be set to go to string buffers instead of stdio buffers, then add a function to the runtime to toggle it |
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
Uh oh!
There was an error while loading. Please reload this page.
-
console.log
works and could print to console.I wonder how to capture
stdout
andstderr
?To my understanding, the js script is running in the same thread as the rust program, so there is no stdout.
But what if I need the data from
stdout
andstderr
?Beta Was this translation helpful? Give feedback.
All reactions