Repository: cxf Updated Branches: refs/heads/master 82e46aad4 -> 54723262a
[CXF-6536] Allowing to configure pretty printing on logging interceptors Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/54723262 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/54723262 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/54723262 Branch: refs/heads/master Commit: 54723262aa1cc6f33a9b158e92694c454c3904d6 Parents: 82e46aa Author: Sergey Beryozkin <[email protected]> Authored: Thu Sep 3 16:56:19 2015 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Sep 3 16:56:19 2015 +0100 ---------------------------------------------------------------------- .../apache/cxf/ext/logging/AbstractLoggingInterceptor.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/54723262/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java index 5fd1bde..4874c68 100644 --- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java +++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java @@ -22,6 +22,7 @@ import java.util.UUID; import org.apache.cxf.ext.logging.event.LogEvent; import org.apache.cxf.ext.logging.event.LogEventSender; +import org.apache.cxf.ext.logging.event.PrettyLoggingFilter; import org.apache.cxf.message.Exchange; import org.apache.cxf.message.Message; import org.apache.cxf.phase.AbstractPhaseInterceptor; @@ -55,6 +56,12 @@ abstract class AbstractLoggingInterceptor extends AbstractPhaseInterceptor<Messa return threshold; } + public void setPrettyLogging(boolean prettyLogging) { + if (sender instanceof PrettyLoggingFilter) { + ((PrettyLoggingFilter)this.sender).setPrettyLogging(prettyLogging); + } + } + public void createExchangeId(Message message) { Exchange exchange = message.getExchange(); String exchangeId = (String)exchange.get(LogEvent.KEY_EXCHANGE_ID);
