LazyArg

public interface LazyArg<T>

Functional interface for allowing lazily evaluated arguments to be supplied to Flogger. This allows callers to defer argument evaluation efficiently when:

  • Doing "fine" logging that's normally disabled
  • Applying rate limiting to log statements

See also

<a href="https://github.com/google/flogger/blob/cb9e836a897d36a78309ee8badf5cad4e6a2d3d8/api/src/main/java/com/google/common/flogger/LazyArg.java">

Original Java code of Google Flogger

Functions

Link copied to clipboard
@Nullable()
public abstract @Nullable() T evaluate()
Computes a value to use as a log argument.