Package com.google.common.flogger
Interface LazyArg<T>
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
evaluate()
Computes a value to use as a log argument.
-
-
-
Method Detail
-
evaluate
@NullableDecl T evaluate()
Computes a value to use as a log argument. This method is invoked once the Flogger library has determined that logging will occur, and the returned value is used in place of theLazyArg
instance that was passed into the log statement.
-
-