TraceDriver


public class TraceDriver


The entry point for the tracing API.

Summary

Public constructors

TraceDriver(@NonNull TraceSink sink, boolean isEnabled)

Builds an instance of TraceDriver using the provided TraceSink if isEnabled is true.

Public methods

void

Flushes all outstanding packets to the TraceSink and then closes the TraceSink.

void

Flushes the trace packets into the underlying TraceSink.

@NonNull Tracer

Return an instance of a Tracer that can be used to emit trace events.

Public constructors

TraceDriver

Added in 2.0.0-alpha01
public TraceDriver(@NonNull TraceSink sink, boolean isEnabled)

Builds an instance of TraceDriver using the provided TraceSink if isEnabled is true. Otherwise, you get an instance of a no-op TraceDriver.

Public methods

close

Added in 2.0.0-alpha01
public void close()

Flushes all outstanding packets to the TraceSink and then closes the TraceSink.

flush

Added in 2.0.0-alpha01
public void flush()

Flushes the trace packets into the underlying TraceSink.

getTracer

Added in 2.0.0-alpha01
public @NonNull Tracer getTracer()

Return an instance of a Tracer that can be used to emit trace events.