Example usage for org.springframework.beans.factory.parsing FailFastProblemReporter setLogger

List of usage examples for org.springframework.beans.factory.parsing FailFastProblemReporter setLogger

Introduction

In this page you can find the example usage for org.springframework.beans.factory.parsing FailFastProblemReporter setLogger.

Prototype

public void setLogger(@Nullable Log logger) 

Source Link

Document

Set the Log logger that is to be used to report warnings.

Usage

From source file:org.springframework.beans.factory.parsing.FailFastProblemReporterTests.java

@Test
public void testWarn() throws Exception {
    Problem problem = new Problem("VGER", new Location(new DescriptiveResource("here")), null,
            new IllegalArgumentException());

    Log log = mock(Log.class);

    FailFastProblemReporter reporter = new FailFastProblemReporter();
    reporter.setLogger(log);
    reporter.warning(problem);//w ww .j  a v  a  2s. c  om

    verify(log).warn(any(), isA(IllegalArgumentException.class));
}