You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The log functions (debug, info, trace and such) evaluates the parameters even though the urgency blocks the log. For this reason log functions should also provide a way for users to specify a call where the parameters are lazily evaluated. An example is:
public static void debug(Supplier<String> supplier) {
if (urgency.level >= Urgency.Debug.level) {
out(format(supplier.get(), Urgency.Debug));
}
}
// Calling it would look like the following:
Log.debug(() -> "Hello, World!");
Here the Supplier is only evaluated if we need its value.
The log functions (debug, info, trace and such) evaluates the parameters even though the urgency blocks the log. For this reason log functions should also provide a way for users to specify a call where the parameters are lazily evaluated. An example is:
Here the
Supplier
is only evaluated if we need its value.Originally posted by @Brandhoej in #74 (comment)
The text was updated successfully, but these errors were encountered: