score:186
Yes. Create a filter where the "By log tag" field is
^(?!.*(MYTAG)).*$
where MYTAG
is the tag you don't want to see. I am not a regexp expert (a "regexpert"? ;-) ) so there may be a simpler way to do that negation, but I just tried that and it works.
You can play around with the filter in the field just above the Log Cat message area, by entering filter strings there, like this:
tag:^(?!.*(DeskClock|dalvik|wpa)).*$
which will show all messages except tags "DeskClock", "dalvik", and "wpa".
score:-1
Another way to filter out log messages that don't originate from YOUR app is to select:
Log Level: Verbose
"Show only selected application" (from the filter selection drop down)
Then select your application from the from the drop down debuggable list in the logcat window.
This should only show log messages and output from your app.
score:1
This is a late response, but maybe useful. In the Eclipse environment, in the LogCat view, above the table there is a search box. Pay attention, when empty it reads:
Search for messages. Accepts Java regexes. Prefix with pid:, app:, tag: or text: to limit scope.
It means you can filter your tag by writing there tag:MyTag or even regex tag:My.*
score:3
I have a trick:
Log.d(TAG, "MyTag" + message);
As you can see, when I filter with a key "MyTag", it only shows log from my tag.
score:5
I couldn't get chosen solution to work properly in Android Studio (the IDE that will come with future versions of android SDK). However the following regex solved my problem:
^(?!dalvikvm)
score:8
Depends on which way you view your logcat.
If you are using the GUI logcat interface it's best to create a filter for the tags you want to see. These get dropped into a seperate category. Though the ui changed a bit you can use this old answer from me. Should be clear how this is used (make sure that the "display saved filters tab" button is pressed though, otherwise you won't see the "Add filter" button. You can find that on the top-right of the log). I'm not aware of any option that lets you filter out certain tags from the whole logstream.
If you are using the command line you can mute certain tags. Example:
adb logcat AndroidRuntime:S *:V
shows everything (*:V
) up to the verbose log level, except the tag AndroidRuntime, which will be limited to the "silence" loglevel, which means it will print nothing.
To display a single tag you can use
adb logcat *:S MyAppTag:V OtherTag:V
Same way, everything gets silenced except MyAppTag and OtherTag. See Filtering Log Output for more details.
score:9
This might not seem directly relevant to the question but here is a regex which filters out most of the system generated logs when you put this in your tag filter as described by Rob.
^(?!(WifiMulticast|WifiHW|MtpService|PushClient|InputMethodManager|Provider|SurfaceTextureClient|ImageLoader|dalvikvm|OpenGLRenderer|skia|AbsListView|MediaPlayer|AudioManager|VelocityTracker|Drv|Jpeg|CdpDrv|IspDrv|TpipeDrv|iio|ImgScaler|IMG_MMU|ResMgrDrv|JpgDecComp|JpgDecPipe|mHalJpgDec|PipeMgrDrv|mHalJpgParser|jdwp|libEGL|Zygote|Trace|InputEventReceiver|SpannableStringBuilder|IInputConnectionWrapper|MotionRecognitionManager|Choreographer|v_galz|SensorManager|Sensors|GC|LockPatternUtils|SignalStrength|STATUSBAR-BatteryController|BatteryService|STATUSBAR-PhoneStatusBar|WifiP2pStateTracker|Watchdog|AlarmManager|BatteryStatsImpl|STATUSBAR-Clock))
I keep updating this list of tags as i encounter them testing on different devices. The list is not exhaustive and you are free to contribute to this answer. I am sure this will save an hour for many.
If there are other other logs you need filtered out, append them to this regex using a ' | ' character.
Source: stackoverflow.com
Related Query
- How to filter out a tagname in Eclipse LogCat viewer
- How do I restrict search matches in Eclipse to filter out results in comments?
- How to hide, remove, filter logs in the logcat in Eclipse for Android
- How to find out if an installed Eclipse is 32 or 64 bit version?
- How to filter call stack in Eclipse debug view for Java
- How do I check out an SVN project into Eclipse as a Java project?
- How to find out which feature contains a needed plug-in on an Eclipse download site
- What regex can be used to filter out dalvikvm AND dalvikvm-heap messages from the logcat
- How to disable logcat Text wrap in Eclipse Juno
- How do i find out the JDK version Eclipse is using?
- How do I get Logcat for multiple devices running at the same time in Eclipse
- How can I zoom out the Timeline Panel in Eclipse SDK?
- How to figure out what error my Java Eclipse project has?
- How to make Eclipse Formatter to not destroy commented out code?
- How do I completely uninstall Eclipse so I can sort out my Subclipse trouble?
- How to use external diff viewers in eclipse? Is there any diff viewer available for eclipse inbuilt?
- How to filter the Eclipse Outline View to show only Functions
- How to find out what Eclipse is doing in background?
- How to Find out if Eclipse is running in debug mode
- How to filter JUNIT Tests that are called from eclipse by source path
- How to ignore missing filter file error on pom.xml in Eclipse when using resource filtering?
- How do I make eclipse print out weird characters in unicode?
- Eclipse : how to find out the Eclipse Version
- How to find out in Eclipse if certain method is called from another method directly or indirectly?
- How can I take eclipse out of MDI mode?
- How to open LogCat in Eclipse (for Android Debug)
- Eclipse Logcat filter plus sign not visible
- Logcat viewer in Eclipse flickers annoyingly
- How can I find out the value of an Eclipse path variable or string variable ( `${some_var}` )?
- How to filter ressources during build in Eclipse project?
More Query from same tag
- How to uninstall EGit
- How to reference a "Android Project Library" in my "Android Project"
- The return value for a method isn't being returned to the main
- CodeIgniter Auto Complete?
- Eclipse extension point for attribute content in JSP editor (webtools)
- Genymotion in Eclipse
- Grails Warnings/Errors during run-app
- How to move from Eclipse Carbon to Cocoa 64-bit?
- Changing button actions
- mvn eclipse:eclipse versus regular maven build
- What does it mean "No Launcher activity found!"
- is it possible to open findbugs xml report in some eclipse view
- How to make sections of PHP code in eclipse
- C++ Eclipse use libraries
- Java Quicksort why / where do the values change?
- how migration jetspeed-1.5.jar to jetspeed-2.x for java eclipse?
- Make Eclipse recognize the difference between normal source files and test source files
- Sending image through web service returns "premature end of file"
- I need to call MediaPlayer in my View
- SQLITE "Database is locked" (Java - Eclipse)
- how to attach javadoc in project
- Eclipse.app not opening on MacOSX, the executable opens terminal
- SVN and SFTP synchronisation with eclipse
- Checkout issue in tfs
- One branch per developer: how do you achieve that with SVN?
- one-to-many without foreign key in hibernate
- Trouble printing my list
- Eclipse on OS X - no hotkeys in dialogs?
- Use Azure IoT Plugin for C within Eclipse
- Why is the Eclipse JSP editor uncapable of double-click selecting in a reasonable manner?