Example usage for java.util.logging Logger logp

List of usage examples for java.util.logging Logger logp

Introduction

In this page you can find the example usage for java.util.logging Logger logp.

Prototype

public void logp(Level level, String sourceClass, String sourceMethod, Supplier<String> msgSupplier) 

Source Link

Document

Log a lazily constructed message, specifying source class and method, with no arguments.

Usage

From source file:co.runrightfast.core.utils.LoggingUtils.java

/**
 * Helper for logging JSON messages//from   ww  w .  ja  va  2s  . co m
 *
 * @param logger
 * @param level
 * @param className
 * @param method
 * @param message
 */
static void log(@NonNull final Logger logger, final Level level, final String className, final String method,
        @NonNull final Supplier<JsonObject> message) {
    logger.logp(level, className, method, () -> message.get().toString());
}