public final class LogTreePopulator extends Object
ComponentsLogger.getExtraAnnotations(TreeProps) and transforming them so they can be logged.| Modifier and Type | Method and Description |
|---|---|
static String |
getAnnotationBundleFromLogger(Component component,
ComponentsLogger logger)
Extract treeprops from a scoped
ComponentContext of a given Component and turn
them into a single colon-separated string. |
static PerfEvent |
populatePerfEventFromLogger(ComponentContext c,
ComponentsLogger logger,
PerfEvent perfEvent)
Annotate a log event with the log tag set in the context, and extract the
TreeProps
from a given ComponentContext and convert them into perf event annotations using a
ComponentsLogger implementation. |
static PerfEvent |
populatePerfEventFromLogger(ComponentContext c,
ComponentsLogger logger,
String logTag,
PerfEvent perfEvent)
Annotate a log event with the log tag set in the context, and extract the
TreeProps
from a given ComponentContext and convert them into perf event annotations using a
ComponentsLogger implementation. |
public static PerfEvent populatePerfEventFromLogger(ComponentContext c, ComponentsLogger logger, PerfEvent perfEvent)
TreeProps
from a given ComponentContext and convert them into perf event annotations using a
ComponentsLogger implementation.null if the resulting event isn't deemed worthy
of reporting.public static PerfEvent populatePerfEventFromLogger(ComponentContext c, ComponentsLogger logger, String logTag, PerfEvent perfEvent)
TreeProps
from a given ComponentContext and convert them into perf event annotations using a
ComponentsLogger implementation.null if the resulting event isn't deemed worthy
of reporting.public static String getAnnotationBundleFromLogger(Component component, ComponentsLogger logger)
ComponentContext of a given Component and turn
them into a single colon-separated string.component - Component to extract tree props from.logger - ComponentsLogger to convert treeprops into perf event annotations.populatePerfEventFromLogger(ComponentContext, ComponentsLogger, PerfEvent)