Replies: 3 comments 3 replies
-
I need to get familiar with the usage of tracing first, and this week I will try to create a sample project to achieve this requirement as you described. Happy Chinese new year 🎉 |
Beta Was this translation helpful? Give feedback.
-
Here's an example how to stream logs from Rust to JavaScript. Not the most efficient way of doing it (you should really log in Rust). But, if you need to do this, it could work a bit like this: |
Beta Was this translation helpful? Give feedback.
-
One more question about this. When calling the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We're trying to think about logging and how we can operate between Rust and JavaScript. What we're after here is our Rust code produces structured logs with
tracing
, and we'd like our JavaScript side to be able to catch whatever gets written to STDOUT with a callback, make something with the data and decide on writing to the output. I'd like to understand a bit about the best ways of doing this with napi.rs. Beforehand we had a separate process and we could have a pointer to the process output, but now we're int the same process so we might need to do something smarter.Beta Was this translation helpful? Give feedback.
All reactions