On IntelliJ, i'm trying to read the logcat for seeking errors.
The problem is that all the applications' log are present in the 'Android' Window.
How to only display the log that is relevant ?
I'm not looking for tags since i want to view Exception throws, Segfaults from JNI, etc.
Thanks !
Filtering based on an application (package) is not available in IntelliJ IDEA (current version: 12).
EDIT: Everything above the horizontal rule is my new answer (updated 5/17/13):
I'd suggest moving over to the new Android Studio IDE (which is based of IntelliJ). This allows filtering by package name.
You can vote for the feature to be added here: http://youtrack.jetbrains.com/issue/IDEA-95780
In the meantime, you may think about wrapping the Android Log class to add a suffix/prefix that you could then filter by. Something like the following:
/**
* Wrapper for the Android {@link Log} class.
* <br><br>
* The primary reason for doing this is to add a unique prefix to all tags for easier filtering
* in IntelliJ IDEA (since in v12 there is no way to filter by application).
*
* @author gloesch
*/
public class Logger {
private static final String FILTER = "(MY APP) ";
public static void d(String tag, String message) {
Log.d(tag.concat(FILTER), message);
}
public static void i(String tag, String message) {
Log.i(tag.concat(FILTER), message);
}
public static void v(String tag, String message) {
Log.v(tag.concat(FILTER), message);
}
public static void e(String tag, String message) {
Log.e(tag.concat(FILTER), message);
}
public static void w(String tag, String message) {
Log.w(tag.concat(FILTER), message);
}
public static void wtf(String tag, String message) {
Log.wtf(tag.concat(FILTER), message);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With