uniffi-rs icon indicating copy to clipboard operation
uniffi-rs copied to clipboard

Change log level of methods name logged in Scaffolding

Open Vinnstah opened this issue 1 year ago • 3 comments

Fixes #1702

Change the log level to trace for method names logged by UniFFI internals when FFI calls into Rust.

Augmented existing logging tests in Python, asserting that the changed level works as intended.

Let me know if you want me to put the tests in a new fixture instead of recycling an existing one.

Vinnstah avatar May 29 '24 18:05 Vinnstah

Hi, is there any interest in removing some of the test code here? If I don't hear back soon, I'll put up the 2-line PR that actually fixes this and close this, but I'd like to offer the opportunity to have it completed here.

mhammond avatar Jul 03 '24 14:07 mhammond

Hi Mark, Apologies for the delay. I'll fix the tests and push a new commit asap.

Vinnstah avatar Jul 07 '24 00:07 Vinnstah

thank you for this! @Vinnstah !

praveenperera avatar Aug 12 '24 19:08 praveenperera

I didn't realize this issue has been sitting in the queue for so long. Does https://github.com/mozilla/uniffi-rs/pull/2211 handle your needs or is there still work to be done here?

bendk avatar Nov 20 '24 14:11 bendk

@bendk no my problem is that each time an FFI func is called there's a debug log, that log should be trace level instead, because if not it makes debug logs very noisy.

I've worked around it by putting all the noisy funcs in mod ffi {} and silencing all logs from *ffi* mods, but that's hacky and messy. If this PR is merged in I could get rid of all of those.

praveenperera avatar Nov 20 '24 14:11 praveenperera

I should have pointed you to https://github.com/mozilla/uniffi-rs/pull/2275. As far as I know, there are no more log calls in the current code. I don't think we even have a dependency on the crate. Those calls were replaced by an internal logging mechanism, that's disabled by default.

bendk avatar Nov 20 '24 15:11 bendk

@bendk I'm using master now and its working, no more noisy logs thank you!

Was able to get rid of all my mod ffi: https://github.com/bitcoinppl/cove/commit/ce6cd72120a4d3490a5d69d6deb34527c2f2f996

praveenperera avatar Nov 20 '24 21:11 praveenperera

We've recently removed all log calls from the generated scaffolding.

mhammond avatar Dec 23 '24 00:12 mhammond