vp340 commented on code in PR #3521:
URL: https://github.com/apache/cxf/pull/3521#discussion_r4179610276


##########
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java:
##########


Review Comment:
   > OK, thanks, that may explain double logging in general, what concerns me 
that that second attempt is coming from DelayedCachedOutputStreamCleaner (still 
looking)
   
   Yes I can confirm that the second attempt is for sure coming from 
DelayedCachedOutputStreamCleaner  (as I wrote in the Jira ticket I saw its 
thread name when it log again after 15 minutes). 
   But at this point It's very possible it was only due to 
[CXF-9110](https://issues.apache.org/jira/browse/CXF-9110) 4.0.6 ... 
   The Cos were close (first log), but failed to deregister due to second line 
missing (that U add in 4.0.7):
   > cachedOutputStreamCleaner.unregister(currentStream);
                           cachedOutputStreamCleaner.unregister(this);
   
   So the DelayedCachedOutputStreamCleaner thread close() a second time. 
   
   ---
   
   > (however the side effects like logging callback where not expected at all)
   
   In my case the log (first one) is done when DelayedCachedOutputStreamCleaner 
 clean... and the payload is still available (write() at a certain point fail 
as we know ... but in cos the same byte wrote to the socket are copied safely). 
So when we call writeCacheTo it flush the cos and that payload I think It's 
still valuable to be logged ( I say so as a daily CXF user ). In that case I 
would prefer see a RESP_OUT log along with a "Connection reset" Exception than 
no RESP_OUT log at all.
   Also ,now that I think about it,  that DelayedCachedOutputStreamCleaner  
close only the cos that have a tmp file. So the one with no tmp file (default 
48KB ...so all ) are never never close ...and so also those log are surely 
missing. 
   
   Let me know if U are open to some other solution than (or in addition) to 
DelayedCachedOutputStreamCleaner  . 
   I have a couple of ideas in mind, but since free time is a bit tight right 
now, I’d love to check if U're interested before diving into the 
implementation. ;) 
   
   Let me know what U think. 
   Have a good evening!



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