TraceLog
Tracing log that traces functions calls.
Example usage:
class Foo { private static final TraceLog TRACE_LOG = TraceLog.create(Foo.class).enabled();
void bar() { TRACE_LOG.trace(() -> { ... }); } }
TraceLog can use either logger provided by ali (which honors the logging prefKey) or can use the native Android logger directly.
To use the native logger create TraceLog with of. To use your custom sink create TraceLog with of.
Tracing can be done with trace or with trace. The supplier variant is useful for passing a return value out of the traced block.
TraceLog can also log specific time-points with point where you can provide a message.
The tracing tries to resolve nested functions calls and prints the resulting trace with corresponding indents. When entering a function the log is prepended with "+ " and when leaving the function the log starts with "- ". Points don't have any prefix but do respect indents. The indents are specific for each thread.
TraceLog also allows for capturing and printing the current complete stack trace