rmannibucau commented on a change in pull request #287: [LOG4J2-2688] adding 
support for session attributes in log4j-web
URL: https://github.com/apache/logging-log4j2/pull/287#discussion_r320635765
 
 

 ##########
 File path: log4j-web/src/main/java/org/apache/logging/log4j/web/WebLookup.java
 ##########
 @@ -91,6 +93,18 @@ public String lookup(final LogEvent event, final String 
key) {
                     HttpServletRequest.class.cast(req).getParameter(name) : 
null;
         }
 
+        if (key.startsWith(SESSION_ATTR_PREFIX)) {
+            final ServletRequest req = getRequest();
+            if (HttpServletRequest.class.isInstance(req)) {
 
 Review comment:
   Guess it is mainly a coding habit and the preference over a debuggable 
method (java.lang.Class#cast). Not strong objection if you feel it must be 
change

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


With regards,
Apache Git Services

Reply via email to