use of org.apache.cxf.ext.logging.event.LogEventSender in project cxf by apache.
the class OldLoggingFactoryBeanListener method addLoggingSupport.
private void addLoggingSupport(Endpoint endpoint, Bus bus, Logging annotation) {
if (annotation != null) {
LoggingFeature lf = new LoggingFeature();
lf.setPrettyLogging(annotation.pretty());
lf.setLimit(annotation.limit());
lf.setLogBinary(annotation.showBinary());
lf.setLogBinary(annotation.showBinary());
LogEventSender in = createEventSender(annotation.outLocation());
if (in != null) {
lf.setOutSender(in);
}
LogEventSender out = createEventSender(annotation.inLocation());
if (out != null) {
lf.setInSender(out);
}
lf.initialize(endpoint, bus);
}
}
use of org.apache.cxf.ext.logging.event.LogEventSender 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());
}
Aggregations