arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.53k stars 604 forks source link

Can't remove console.logs in index.js #975

Closed meleffendi closed 6 months ago

meleffendi commented 6 months ago

I need to remove all kind of logs from my android app which uses ffmpeg. I commented out all the Log.xx calls in the java files and they are no longer showing up. However, I still get those:

ffmpeg-kit              usap64                               I  Loading ffmpeg-kit.
ffmpeg-kit              usap64                               I  Loaded ffmpeg-kit-video-arm64-v8a-6.0-lts-20230913.
ffmpeg-kit              usap64                               D  Async callback block started.

I can see the first two are console.logs in index.js which I commented out. But they still show in the logs. Here's what I tried:

remove node_modules npm install comment out all Log.xx calls in java files comment out all console.logs in index.js npx expo run:android --variant release (I'm using expo). I tried clearing the bundler cache with npx expo start --clear

I have proguard enabled in my app to ensure no logs come from the native side I have babel-plugin-transform-remove-console to ensure no logs come from the JS side.

Despite all the above, those three insist on showing. The changes in index.js are not being reflected in the build. Also, usap64 is not my package. I don't know what that is.

Any help?

meleffendi commented 6 months ago

The problem is that ffmpeg-kit-react-native is downloading a compiled ffmpeg-kit and that library contains these logs. To get them removed, I'd have to comment out those lines from source and rebuild the source myself. It would be nice if they did not exist. It's a lot of work for such a simple thing.