[
https://issues.apache.org/jira/browse/LOG4J2-2688?focusedWorklogId=306184&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-306184
]
ASF GitHub Bot logged work on LOG4J2-2688:
------------------------------------------
Author: ASF GitHub Bot
Created on: 04/Sep/19 08:33
Start Date: 04/Sep/19 08:33
Worklog Time Spent: 10m
Work Description: rmannibucau commented on 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 306184)
Time Spent: 20m (was: 10m)
> [web] session attribute lookup support
> --------------------------------------
>
> Key: LOG4J2-2688
> URL: https://issues.apache.org/jira/browse/LOG4J2-2688
> Project: Log4j 2
> Issue Type: Improvement
> Reporter: Romain Manni-Bucau
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)