Skip to content

Commit

Permalink
ATLAS-4528: updated log4j2 version to 2.17.1; removed references to o…
Browse files Browse the repository at this point in the history
…rg.apache.logging.NDC
  • Loading branch information
mneethiraj committed Jan 11, 2022
1 parent f10c848 commit be824ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@
<kafka.version>2.8.1</kafka.version>
<keycloak.version>6.0.1</keycloak.version>
<log4j.version>1.2.17</log4j.version>
<log4j2.version>2.15.0</log4j2.version>
<log4j2.version>2.17.1</log4j2.version>
<lucene-solr.version>8.6.3</lucene-solr.version>
<maven-site-plugin.version>3.7</maven-site-plugin.version>
<MaxPermGen>512m</MaxPermGen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.apache.hadoop.security.authentication.util.SignerSecretProvider;
import org.apache.hadoop.security.authorize.AuthorizationException;
import org.apache.hadoop.security.authorize.ProxyUsers;
import org.apache.log4j.NDC;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.authentication.AbstractAuthenticationToken;
Expand Down Expand Up @@ -792,17 +791,11 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
if (httpRequest.getMethod().equals("OPTIONS")) {
optionsServlet.service(request, response);
} else {
try {
String requestUser = httpRequest.getRemoteUser();
String requestUser = httpRequest.getRemoteUser();

NDC.push(requestUser + ":" + httpRequest.getMethod() + httpRequest.getRequestURI());
LOG.info("Request from authenticated user: {}, URL={}", requestUser, Servlets.getRequestURI(httpRequest));

LOG.info("Request from authenticated user: {}, URL={}", requestUser, Servlets.getRequestURI(httpRequest));

filterChain.doFilter(servletRequest, servletResponse);
} finally {
NDC.pop();
}
filterChain.doFilter(servletRequest, servletResponse);
}
}
}
Expand Down

0 comments on commit be824ba

Please sign in to comment.