Skip to content

CXF-9233: AbstractLoggingInterceptor.LIVE_LOGGING_PROP already set in the message properties, so RESP_OUT is not logged - #3372

Open
reta wants to merge 3 commits into
apache:mainfrom
reta:CXF-9233
Open

CXF-9233: AbstractLoggingInterceptor.LIVE_LOGGING_PROP already set in the message properties, so RESP_OUT is not logged#3372
reta wants to merge 3 commits into
apache:mainfrom
reta:CXF-9233

Conversation

@reta

@reta reta commented Aug 13, 2026

Copy link
Copy Markdown
Member

It turned out that ClientImpl::onMessage may create in-message (response) from the out message (request), copying the contextual properties but changing the message requestor role. That would lead to logging interceptor to mistakenly mark that the message as already logged.

@reta
reta requested review from coheigea and a lite review from Copilot August 23, 2026 17:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a logging regression where AbstractLoggingInterceptor.LIVE_LOGGING_PROP can be copied between related CXF Message instances (e.g., request→response), causing the RESP_OUT event to be incorrectly treated as “already logged” and therefore skipped.

Changes:

  • Namespace the “already logged” marker property by adding a suffix to LIVE_LOGGING_PROP when storing/reading it.
  • Add/extend regression tests for REST proxy clients and JAX-WS local-transport scenarios to validate all four expected logging events.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/TestServiceRest.java Refactors the test resource implementation to implement a shared annotated contract interface.
rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/TestService.java Introduces a JAX-RS annotated contract interface used by proxy-based tests.
rt/rs/client/src/test/java/org/apache/cxf/jaxrs/client/logging/RESTLoggingTest.java Adds a proxy-client regression test and a helper to create typed proxy clients with logging enabled.
rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java Adds a local-transport JAX-WS test that captures log events to validate the fix in SOAP client flows.
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java Writes the “already logged” marker using a suffixed property key.
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingInInterceptor.java Writes the “already logged” marker using a suffixed property key.
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java Updates the contextual-property lookup for the marker key and adds a suffix helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants