public abstract class LithoStartupLogger
extends java.lang.Object
The implementations decide how to log points (via onMarkPoint(String)
) and whether
this logger is enabled (via isEnabled()
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHANGESET_CALCULATION |
static java.lang.String |
END |
static java.lang.String |
FIRST_LAYOUT |
static java.lang.String |
FIRST_MOUNT |
static java.lang.String |
LAST_MOUNT |
static java.lang.String |
LITHO_PREFIX |
static java.lang.String |
START |
Constructor and Description |
---|
LithoStartupLogger() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLatestDataAttribution() |
protected abstract boolean |
isEnabled() |
static boolean |
isEnabled(LithoStartupLogger logger) |
void |
markPoint(java.lang.String eventName,
java.lang.String stage)
Mark the event with given name and stage (start/end).
|
void |
markPoint(java.lang.String eventName,
java.lang.String stage,
java.lang.String dataAttribution)
Mark the event with given name, stage (start/end), and given data attribution.
|
protected abstract void |
onMarkPoint(java.lang.String name)
Callback to log the event point.
|
void |
setDataAttribution(java.lang.String attribution)
Set attribution to the rendered events like the network query name, data source (network/cache)
etc.
|
public static final java.lang.String LITHO_PREFIX
public static final java.lang.String CHANGESET_CALCULATION
public static final java.lang.String FIRST_LAYOUT
public static final java.lang.String FIRST_MOUNT
public static final java.lang.String LAST_MOUNT
public static final java.lang.String START
public static final java.lang.String END
public static boolean isEnabled(LithoStartupLogger logger)
public void setDataAttribution(java.lang.String attribution)
public java.lang.String getLatestDataAttribution()
public void markPoint(java.lang.String eventName, java.lang.String stage)
public void markPoint(java.lang.String eventName, java.lang.String stage, java.lang.String dataAttribution)
protected abstract void onMarkPoint(java.lang.String name)
protected abstract boolean isEnabled()