Search in sources :

Example 1 with PrettyLoggingFilter

use of org.apache.cxf.ext.logging.event.PrettyLoggingFilter in project cxf by apache.

the class TestPrettyLoggingFilter method filter.

private void filter(String payload, String expected, boolean truncated) {
    LogEvent logEvent = new LogEvent();
    logEvent.setPayload(payload);
    logEvent.setContentType("text/xml");
    logEvent.setTruncated(truncated);
    LogEventSender dummy = new LogEventSender() {

        public void send(LogEvent event) {
        }
    };
    PrettyLoggingFilter prettyFilter = new PrettyLoggingFilter(dummy);
    prettyFilter.setPrettyLogging(true);
    prettyFilter.send(logEvent);
    assertEquals(expected, logEvent.getPayload());
}
Also used : LogEventSender(org.apache.cxf.ext.logging.event.LogEventSender) PrettyLoggingFilter(org.apache.cxf.ext.logging.event.PrettyLoggingFilter) LogEvent(org.apache.cxf.ext.logging.event.LogEvent)

Aggregations

LogEvent (org.apache.cxf.ext.logging.event.LogEvent)1 LogEventSender (org.apache.cxf.ext.logging.event.LogEventSender)1 PrettyLoggingFilter (org.apache.cxf.ext.logging.event.PrettyLoggingFilter)1