borcsokj commented on a change in pull request #801:
URL: https://github.com/apache/cxf/pull/801#discussion_r637960040



##########
File path: 
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/DefaultLogEventMapper.java
##########
@@ -320,7 +322,7 @@ public EventType getEventType(Message message) {
      */
     private boolean isRESTFault(Message message) {
         Object opName = 
message.getExchange().get("org.apache.cxf.resource.operation.name");
-        if (opName == null) {
+        if (opName == null && 
!PREFLIGHT_PASSED.equals(message.getExchange().get(CORS_FILTER))) {

Review comment:
       My first approach was checking responseCode (if available) even if 
operation is empty but I found "For REST we also consider a response to be a 
fault if the operation is not found" in JavaDoc of the method. I think logging 
should be separated for internals of other components (i.e. CORS) as you wrote 
but I don't know the reason why REST message missing opName is marked as fault.




-- 
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.

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


Reply via email to