Example usage for org.springframework.boot.logging DeferredLog DeferredLog

List of usage examples for org.springframework.boot.logging DeferredLog DeferredLog

Introduction

In this page you can find the example usage for org.springframework.boot.logging DeferredLog DeferredLog.

Prototype

DeferredLog

Source Link

Usage

From source file:org.springframework.boot.devtools.logger.DevToolsLogFactory.java

/**
 * Get a {@link Log} instance for the specified source that will be automatically
 * {@link DeferredLog#switchTo(Class) switched} then the {@link AbstractPageRequest
 * context is prepared}./*w ww . ja va  2s  .  c  o  m*/
 * @param source the source for logging
 * @return a {@link DeferredLog} instance
 */
public static Log getLog(Class<?> source) {
    synchronized (logs) {
        Log log = new DeferredLog();
        logs.put(log, source);
        return log;
    }
}