FloggerLogSites

public final class FloggerLogSites

Helper class to generate log sites for the current line of code. This class is deliberately isolated (rather than having the method in FloggerLogSite itself) because manual log site injection is rare and by isolating it into a separate class may help encourage users to think carefully about the issue.

See also

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

Original Java code of Google Flogger

Functions

Link copied to clipboard
public static FloggerLogSite callerOf(Class<? extends Object> loggingApi)
Returns a LogSite for the caller of the specified class.
Link copied to clipboard
public static FloggerLogSite logSite()
Returns a LogSite for the current line of code.
Link copied to clipboard
public static FloggerLogSite logSiteFrom(@Nullable() @Nullable() StackTraceElement e)
Returns a new LogSite which reflects the information in the given , or INVALID if given null.