reta commented on code in PR #3343:
URL: https://github.com/apache/cxf/pull/3343#discussion_r3780231172


##########
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java:
##########
@@ -25,20 +25,21 @@
 import java.util.regex.Pattern;
 
 import org.apache.cxf.common.util.PropertyUtils;
-import org.apache.cxf.ext.logging.event.DefaultLogEventMapper;
-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.ext.logging.event.*;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 
+import static 
org.apache.cxf.ext.logging.event.DefaultLogEventMapper.normalizeFlow;
+
 public abstract class AbstractLoggingInterceptor extends 
AbstractPhaseInterceptor<Message> {
     public static final int DEFAULT_LIMIT = 48 * 1024;
     public static final int DEFAULT_THRESHOLD = -1;
     public static final String CONTENT_SUPPRESSED = "--- Content suppressed 
---";
     protected static final String  LIVE_LOGGING_PROP = 
"org.apache.cxf.logging.enable";
+    protected static final String IDEMPOTENT_LOGGING_PROP = 
"org.apache.cxf.idempotent.logging."; // the EventType (flow) and ExchangeId 
will be concatenated

Review Comment:
   > I was updating the Jira ticket right now. (sorry I live in Italy and here 
is almost 2 a.m right now and tomorrow I have work) .
   
   Thanks @vp340 , np at all
   
   > If I understand well the isRequestor() method is the same use to retrieve 
the EventType for logging ..so isRequestor ? EventType.RESP_IN : 
EventType.REQ_IN
   It will set 'LIVE_LOGGING_PROP + true' if it's a client and a 
'LIVE_LOGGING_PROP + false' if is a server.
   
   This is correct (in the nutshell) just benefiting from CXF message handling 
logic
   
   > The only doubt situation could be 2 backend call in a row...
   
   This should have different message instance created per call, the message 
should not be reused 
   
   > I open a new https://github.com/apache/cxf/pull/3373
   
   This is possible but not the best option: the framework core (Client / 
Message) knows nothing about properties that are specific to custom 
interceptors. The tracking and decision making has to be done within in/out 
logging interceptors. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to