socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.31k stars 969 forks source link

Straightforward logging option for Android #755

Open ricardopereira opened 9 months ago

ricardopereira commented 9 months ago

Is your feature request related to a problem? Please describe. Yes, while debugging in Android Studio using the Socket IO client library, I find it challenging to quickly and efficiently view the socket logs in the Logcat. They simply don't appear on Logcat even while debugging. The documentation (https://socketio.github.io/socket.io-client-java/logging.html) show 3 different ways to settle the logger which is not ideal. A straightforward mechanism to enable and view these logs would greatly enhance the debugging experience, especially when compared to how it's handled in Swift.

Describe the solution you'd like I'd like a simple configuration option to enable socket logs, similar to how it's implemented in Swift:

config.insert(.log(true))

Describe alternatives you've considered Currently, to view socket logs, one might have to install dependencies and configurations or use workarounds which can be time-consuming and less intuitive. An integrated log flag would simplify this process, providing an easier and more developer-friendly approach.

Additional context Debugging is an essential aspect of development, and having a direct way to enable and view logs can speed up issue detection and resolution. Providing such an option would bring the Android Socket IO client library on par with the ease-of-use seen in its Swift counterpart.