You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We often need to request logs from users. Sometimes it is a real PITA.
We need a way to easily gather and copy logs from within the app.
Standard android.util.Log doesn't provide any way to redirect or collect logs. It is possible to call logcat and gather the results, but it is ugly and has some limitations.
I was thinking about moving to SLF4J + logback-android. It should allow to log to various outputs (standard Android logcat, file, etc.). Also, SLF4J's API is better (no need for explicit String.format() in logging). Though, it would require to replace all the android.util.Log usages.
I don't see any downsides of it.
Any other ideas?
The text was updated successfully, but these errors were encountered:
About the downsides of using SLF4J on Android: there probably are libraries that log directly to logcat, so SLF4J wouldn't be able to gather that output.
We often need to request logs from users. Sometimes it is a real PITA.
We need a way to easily gather and copy logs from within the app.
Standard
android.util.Log
doesn't provide any way to redirect or collect logs. It is possible to calllogcat
and gather the results, but it is ugly and has some limitations.I was thinking about moving to SLF4J + logback-android. It should allow to log to various outputs (standard Android logcat, file, etc.). Also, SLF4J's API is better (no need for explicit
String.format()
in logging). Though, it would require to replace all theandroid.util.Log
usages.I don't see any downsides of it.
Any other ideas?
The text was updated successfully, but these errors were encountered: