Improve logging
Summary: Lets make the logging higher signal Reviewed By: passy Differential Revision: D50853449 fbshipit-source-id: 95ebfbc142c34c36fb11e459c573842580cd6e4c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bd6e1285da
commit
62e9181075
@@ -43,7 +43,6 @@ class DecorViewTracker(private val context: UIDContext, private val snapshotter:
|
|||||||
private val mStopWatch = StopWatch()
|
private val mStopWatch = StopWatch()
|
||||||
|
|
||||||
fun start() {
|
fun start() {
|
||||||
Log.i(LogTag, "Subscribing activity / root view changes")
|
|
||||||
|
|
||||||
val applicationRef = context.applicationRef
|
val applicationRef = context.applicationRef
|
||||||
|
|
||||||
@@ -55,6 +54,7 @@ class DecorViewTracker(private val context: UIDContext, private val snapshotter:
|
|||||||
|
|
||||||
override fun onRootViewsChanged(rootViews: List<View>) {
|
override fun onRootViewsChanged(rootViews: List<View>) {
|
||||||
// remove predraw listen from current view as its going away or will be covered
|
// remove predraw listen from current view as its going away or will be covered
|
||||||
|
Log.i(LogTag, "Removing pre draw listener from ${currentDecorView?.objectIdentity()}")
|
||||||
currentDecorView?.viewTreeObserver?.removeOnPreDrawListener(preDrawListener)
|
currentDecorView?.viewTreeObserver?.removeOnPreDrawListener(preDrawListener)
|
||||||
|
|
||||||
// setup new listener on top most view, that will be the active child in traversal
|
// setup new listener on top most view, that will be the active child in traversal
|
||||||
@@ -85,8 +85,9 @@ class DecorViewTracker(private val context: UIDContext, private val snapshotter:
|
|||||||
// On subscribe, trigger a traversal on whatever roots we have
|
// On subscribe, trigger a traversal on whatever roots we have
|
||||||
rootViewListener.onRootViewsChanged(applicationRef.rootsResolver.rootViews())
|
rootViewListener.onRootViewsChanged(applicationRef.rootsResolver.rootViews())
|
||||||
|
|
||||||
Log.i(LogTag, "${context.applicationRef.rootsResolver.rootViews().size} root views")
|
Log.i(
|
||||||
Log.i(LogTag, "${context.applicationRef.activitiesStack.size} activities")
|
LogTag,
|
||||||
|
"Starting tracking root views, currently ${context.applicationRef.rootsResolver.rootViews().size} root views")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun stop() {
|
fun stop() {
|
||||||
|
|||||||
@@ -131,8 +131,6 @@ class UpdateQueue(val context: UIDContext) {
|
|||||||
val (_, sendTimeMs) =
|
val (_, sendTimeMs) =
|
||||||
StopWatch.time { context.connectionRef.connection?.send(FrameScanEvent.name, serialized) }
|
StopWatch.time { context.connectionRef.connection?.send(FrameScanEvent.name, serialized) }
|
||||||
|
|
||||||
Log.i(LogTag, "Sent frame with nodes ${nodes.size}")
|
|
||||||
|
|
||||||
// Note about payload size:
|
// Note about payload size:
|
||||||
// Payload size is an approximation as it assumes all characters
|
// Payload size is an approximation as it assumes all characters
|
||||||
// are ASCII encodable, this should be true for most of the payload content.
|
// are ASCII encodable, this should be true for most of the payload content.
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
package com.facebook.flipper.plugins.uidebugger.util
|
package com.facebook.flipper.plugins.uidebugger.util
|
||||||
|
|
||||||
import android.util.Log
|
|
||||||
import com.facebook.flipper.plugins.uidebugger.LogTag
|
|
||||||
import com.facebook.flipper.plugins.uidebugger.model.InspectableValue
|
import com.facebook.flipper.plugins.uidebugger.model.InspectableValue
|
||||||
|
|
||||||
// Maintains 2 way mapping between some enum value and a readable string representation
|
// Maintains 2 way mapping between some enum value and a readable string representation
|
||||||
@@ -19,9 +17,6 @@ open class EnumMapping<T>(private val mapping: Map<String, T>) {
|
|||||||
return if (entry != null) {
|
return if (entry != null) {
|
||||||
entry.key
|
entry.key
|
||||||
} else {
|
} else {
|
||||||
Log.v(
|
|
||||||
LogTag,
|
|
||||||
"Could not convert enum value ${enumValue.toString()} to string, known values ${mapping.entries}")
|
|
||||||
NoMapping
|
NoMapping
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user