Introduction
I am developing an application for Android, and it seems that there are several persistent protocols in a powerful system, see some examples below. I am debugging Eclipse on my Galaxy S4 device (4.2.2).
Here is a list of the types of log messages that I see in the view LogCat:
I/System.out: it displays debuggers, signs the beginning of the application, usefulD/dalvikvm: GC_FOR_ALLOC, GC_CONCURRENTuseful for viewing that I created too much garbage with my codeD/AbsListView, I/endeffect: every time a ListView is created, i.e. basically when I move between actionsI/CustomFrequencyManager, D/GestureDetector: every time I touch the screenW/IInputConnectionWrapper: I don’t know, but definitely not my mistake, i.e. spam- others: do not mind, since they are mostly errors.
Question
How to disable certain log messages that are not generated by my code? To get rid of the list creation logs, I already tried:
adb shell setprop log.tag.AbsListView INFO from windows cmdSystem.setProperties("log.tag.AbsListView", "INFO") in Application.onCreate
I am looking for a solution that
- I can embed the application / configuration into my code, so I don’t need to run it every time I reboot the phone (as it would be with
adb setprop). - doesn’t set the WARN log level in the LogCat view, because it will mean that I am stuck in WARN, ERROR and FATAL for my own application (that you must admit that this is not the best way to send debug messages; plus it will hide important things, such as GC!)
And the magazine
10-26 18:45:36.387: W/ActivityThread(10956): Application com.example.android.apis is waiting for the debugger on port 8100...
10-26 18:45:36.437: I/System.out(10956): Sending WAIT chunk
10-26 18:45:36.447: I/dalvikvm(10956): Debugger is active
10-26 18:45:36.638: I/System.out(10956): Debugger has connected
10-26 18:45:36.638: I/System.out(10956): waiting for debugger to settle...
10-26 18:45:36.838: I/System.out(10956): waiting for debugger to settle...
10-26 18:45:37.038: I/System.out(10956): waiting for debugger to settle...
10-26 18:45:37.839: I/System.out(10956): debugger has settled (1325)
10-26 18:45:38.610: E/MoreInfoHPW_ViewGroup(10956): Parent view is not a TextView
10-26 18:45:38.680: D/dalvikvm(10956): GC_FOR_ALLOC freed 767K, 9% free 17300K/18984K, paused 17ms, total 20ms
10-26 18:45:38.690: I/dalvikvm-heap(10956): Grow heap (frag case) to 20.036MB for 2359312-byte allocation
10-26 18:45:38.700: D/dalvikvm(10956): GC_FOR_ALLOC freed 3K, 8% free 19600K/21292K, paused 13ms, total 13ms
10-26 18:45:38.720: D/dalvikvm(10956): GC_CONCURRENT freed <1K, 8% free 19601K/21292K, paused 3ms+5ms, total 17ms
10-26 18:45:38.760: D/AbsListView(10956): Get MotionRecognitionManager
10-26 18:45:38.770: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 4
10-26 18:45:38.770: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:45:38.890: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 0
10-26 18:45:38.890: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:45:38.920: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:45:38.950: I/endeffect(10956): AbsListView.onMeasure(), getWidth()=0, getHeight()=0, this=android.widget.ListView{424124d8 VFED.VC. .F....I. 0,0-0,0
10-26 18:45:38.960: D/libEGL(10956): loaded /system/lib/egl/libEGL_adreno200.so
10-26 18:45:38.960: D/libEGL(10956): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
10-26 18:45:38.970: D/libEGL(10956): loaded /system/lib/egl/libGLESv2_adreno200.so
10-26 18:45:38.970: I/Adreno200-EGL(10956): <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: (CL3579225)
10-26 18:45:38.970: I/Adreno200-EGL(10956): Build Date: 04/22/13 Mon
10-26 18:45:38.970: I/Adreno200-EGL(10956): Local Branch: adreno_sba_20130419
10-26 18:45:38.970: I/Adreno200-EGL(10956): Remote Branch:
10-26 18:45:38.970: I/Adreno200-EGL(10956): Local Patches:
10-26 18:45:38.970: I/Adreno200-EGL(10956): Reconstruct Branch:
10-26 18:45:39.040: D/OpenGLRenderer(10956): Enabling debug mode 0
10-26 18:45:39.150: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:45:39.150: I/endeffect(10956): AbsListView.onLayout(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{424124d8 VFED.VC. .F....ID 0,0-1080,1701
10-26 18:45:39.320: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:45:39.480: I/endeffect(10956): AbsListView.onMeasure(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{424124d8 VFED.VC. .F....I. 0,0-1080,1701
10-26 18:45:39.490: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:45:39.490: I/endeffect(10956): AbsListView.onLayout(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{424124d8 VFED.VC. .F....ID 0,0-1080,1701
10-26 18:45:56.757: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 1566000, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER@1
10-26 18:45:56.757: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER@1 frequency : 1566000type = 6
10-26 18:45:56.767: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER@1
10-26 18:45:56.767: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER@1
10-26 18:45:56.767: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:45:56.767: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:45:56.767: I/CustomFrequencyManager(10956): CPUDVFSControlRequest : doFrequencyRequest:: = 1566000 Timeout : -1
10-26 18:45:56.767: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 2, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:45:56.767: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER_CORE@2 frequency : 2type = 4
10-26 18:45:56.767: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:45:56.767: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:45:56.777: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:45:56.777: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:45:56.777: I/CustomFrequencyManager(10956): CPUCoreControlRequest : doFrequencyRequest:: = 2 Timeout : -1
10-26 18:45:56.807: D/GestureDetector(10956): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 8 mFalseSizeCnt:0
10-26 18:45:57.908: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 1566000, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER@1
10-26 18:45:57.908: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER@1 frequency : 1566000type = 6
10-26 18:45:57.908: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER@1
10-26 18:45:57.908: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER@1
10-26 18:45:57.908: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:45:57.908: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:45:57.908: I/CustomFrequencyManager(10956): CPUDVFSControlRequest : doFrequencyRequest:: = 1566000 Timeout : -1
10-26 18:45:57.918: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 2, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:45:57.918: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER_CORE@2 frequency : 2type = 4
10-26 18:45:57.918: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:45:57.918: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:45:57.928: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:45:57.928: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:45:57.928: I/CustomFrequencyManager(10956): CPUCoreControlRequest : doFrequencyRequest:: = 2 Timeout : -1
10-26 18:45:58.099: D/GestureDetector(10956): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 17 mFalseSizeCnt:0
10-26 18:46:09.209: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 1566000, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER@1
10-26 18:46:09.209: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER@1 frequency : 1566000type = 6
10-26 18:46:09.219: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER@1
10-26 18:46:09.219: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER@1
10-26 18:46:09.219: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:46:09.219: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:46:09.219: I/CustomFrequencyManager(10956): CPUDVFSControlRequest : doFrequencyRequest:: = 1566000 Timeout : -1
10-26 18:46:09.219: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 2, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:46:09.229: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER_CORE@2 frequency : 2type = 4
10-26 18:46:09.229: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:46:09.229: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER_CORE@2
10-26 18:46:09.229: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:46:09.229: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:46:09.229: I/CustomFrequencyManager(10956): CPUCoreControlRequest : doFrequencyRequest:: = 2 Timeout : -1
10-26 18:46:09.930: D/GestureDetector(10956): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 51 mFalseSizeCnt:0
10-26 18:46:17.347: D/GestureDetector(10956): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 9 mFalseSizeCnt:0
10-26 18:46:18.028: E/MoreInfoHPW_ViewGroup(10956): Parent view is not a TextView
10-26 18:46:18.058: D/AbsListView(10956): Get MotionRecognitionManager
10-26 18:46:18.068: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 4
10-26 18:46:18.068: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.078: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 0
10-26 18:46:18.078: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.078: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.098: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.128: I/endeffect(10956): AbsListView.onMeasure(), getWidth()=0, getHeight()=0, this=android.widget.ListView{427b2ca0 VFED.VC. .F....I. 0,0-0,0
10-26 18:46:18.228: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.228: I/endeffect(10956): AbsListView.onLayout(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{427b2ca0 VFED.VC. .F....ID 0,0-1080,1701
10-26 18:46:18.338: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.408: I/endeffect(10956): AbsListView.onMeasure(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{427b2ca0 VFED.VC. .F....I. 0,0-1080,1701
10-26 18:46:18.418: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:18.418: I/endeffect(10956): AbsListView.onLayout(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{427b2ca0 VFED.VC. .F....ID 0,0-1080,1701
10-26 18:46:18.549: W/IInputConnectionWrapper(10956): setComposingText on inactive InputConnection
10-26 18:46:18.559: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 4
10-26 18:46:18.559: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:23.914: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 1566000, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER@3
10-26 18:46:23.914: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER@3 frequency : 1566000type = 6
10-26 18:46:23.914: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER@3
10-26 18:46:23.914: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER@3
10-26 18:46:23.914: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:46:23.914: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:46:23.914: I/CustomFrequencyManager(10956): CPUDVFSControlRequest : doFrequencyRequest:: = 1566000 Timeout : -1
10-26 18:46:23.924: I/CustomFrequencyManager(10956): newFrequencyRequest - mFrequency = 2, mTimeoutMs = -1, mPkgName = LIST_SCROLL_BOOSTER_CORE@4
10-26 18:46:23.924: I/CustomFrequencyManager(10956): Boost Request from package = LIST_SCROLL_BOOSTER_CORE@4 frequency : 2type = 4
10-26 18:46:23.924: I/CustomFrequencyManager(10956): !! pkgName = LIST_SCROLL_BOOSTER_CORE@4
10-26 18:46:23.924: I/CustomFrequencyManager(10956): Request from package name pkgName = LIST_SCROLL_BOOSTER_CORE@4
10-26 18:46:23.924: I/CustomFrequencyManager(10956): mContext is Not Null mContext.pkgName = com.example.android.apis
10-26 18:46:23.924: I/CustomFrequencyManager(10956): mToken is Null....Creating New Binder!
10-26 18:46:23.924: I/CustomFrequencyManager(10956): CPUCoreControlRequest : doFrequencyRequest:: = 2 Timeout : -1
10-26 18:46:24.835: D/GestureDetector(10956): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 61 mFalseSizeCnt:0
10-26 18:46:26.676: D/GestureDetector(10956): [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 11 mFalseSizeCnt:0
10-26 18:46:27.307: E/MoreInfoHPW_ViewGroup(10956): Parent view is not a TextView
10-26 18:46:27.337: D/AbsListView(10956): Get MotionRecognitionManager
10-26 18:46:27.347: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 4
10-26 18:46:27.347: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.357: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 0
10-26 18:46:27.357: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.357: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.387: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.407: I/endeffect(10956): AbsListView.onMeasure(), getWidth()=0, getHeight()=0, this=android.widget.ListView{4286ddf8 VFED.VC. .F....I. 0,0-0,0
10-26 18:46:27.517: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.517: I/endeffect(10956): AbsListView.onLayout(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{4286ddf8 VFED.VC. .F....ID 0,0-1080,1701
10-26 18:46:27.627: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.727: I/endeffect(10956): AbsListView.onMeasure(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{4286ddf8 VFED.VC. .F....I. 0,0-1080,1701
10-26 18:46:27.738: D/AbsListView(10956): unregisterIRListener() is called
10-26 18:46:27.738: I/endeffect(10956): AbsListView.onLayout(), getWidth()=1080, getHeight()=1701, this=android.widget.ListView{4286ddf8 VFED.VC. .F....ID 0,0-1080,1701
10-26 18:46:27.808: W/IInputConnectionWrapper(10956): setComposingText on inactive InputConnection
10-26 18:46:27.818: D/AbsListView(10956): onVisibilityChanged() is called, visibility : 4
10-26 18:46:27.818: D/AbsListView(10956): unregisterIRListener() is called
: Android ApiDemos, / .