mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.91k stars 1.59k forks source link

Unnecessary output to logcat #389

Closed janimm closed 3 years ago

janimm commented 3 years ago

On each write to serial, logcat message is outputted

D/CommonUsbSerialPort: Wrote #/# offset #/# timeout ###

This is on version 3.4.2.

Not a big problem but unnecessarily floods the logcat.

kai-morich commented 3 years ago

with adb shell setprop log.tag.CommonUsbSerialPort INFO you can reduce the logging level since Android 8.0

janimm commented 3 years ago

I'm aware of that. Problem to my opinion is that this unnecessarily floods the log on released software. I'd prefer a function that would toggle log output on/off.

kai-morich commented 3 years ago

could be solved similar to this: https://github.com/mik3y/usb-serial-for-android/blob/d3198793861db418ee1ac33ef929d1ab49a8d878/usbSerialForAndroid/src/main/java/com/hoho/android/usbserial/util/SerialInputOutputManager.java#L25 where logcat was flooded with read logs

janimm commented 3 years ago

That would be perfect solution if you could add this to a future release.