Example usage for org.springframework.core.log LogMessage of

List of usage examples for org.springframework.core.log LogMessage of

Introduction

In this page you can find the example usage for org.springframework.core.log LogMessage of.

Prototype

public static LogMessage of(Supplier<? extends CharSequence> supplier) 

Source Link

Document

Build a lazily resolving message from the given supplier.

Usage

From source file:org.springframework.core.log.LogAccessor.java

/**
 * Log a message with trace log level./*from  w w  w .jav  a  2 s . c o  m*/
 * @param messageSupplier a lazy supplier for the message to log
 */
public void trace(Supplier<? extends CharSequence> messageSupplier) {
    this.log.trace(LogMessage.of(messageSupplier));
}

From source file:org.springframework.core.log.LogAccessor.java

/**
 * Log an error with trace log level.// w w  w.ja  va  2s  .  c o m
 * @param cause the exception to log
 * @param messageSupplier a lazy supplier for the message to log
 */
public void trace(Throwable cause, Supplier<? extends CharSequence> messageSupplier) {
    this.log.trace(LogMessage.of(messageSupplier), cause);
}