SOLR-7274: Removed a few eager string constructions from log.debug

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685289 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ramkumar Aiyengar 2015-06-13 16:58:55 +00:00
parent 63db425c87
commit d7996c5583
1 changed files with 5 additions and 5 deletions

View File

@ -89,7 +89,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
@Override @Override
public void init(FilterConfig config) throws ServletException public void init(FilterConfig config) throws ServletException
{ {
log.info("SolrDispatchFilter.init()" + this.getClass().getClassLoader()); log.info("SolrDispatchFilter.init(): {}", this.getClass().getClassLoader());
String exclude = config.getInitParameter("excludePatterns"); String exclude = config.getInitParameter("excludePatterns");
if(exclude != null) { if(exclude != null) {
String[] excludeArray = exclude.split(","); String[] excludeArray = exclude.split(",");
@ -157,7 +157,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
if ("zookeeper".equalsIgnoreCase(solrxmlLocation)) { if ("zookeeper".equalsIgnoreCase(solrxmlLocation)) {
String zkHost = System.getProperty("zkHost"); String zkHost = System.getProperty("zkHost");
log.info("Trying to read solr.xml from " + zkHost); log.info("Trying to read solr.xml from {}", zkHost);
if (StringUtils.isEmpty(zkHost)) if (StringUtils.isEmpty(zkHost))
throw new SolrException(ErrorCode.SERVER_ERROR, throw new SolrException(ErrorCode.SERVER_ERROR,
"Could not load solr.xml from zookeeper: zkHost system property not set"); "Could not load solr.xml from zookeeper: zkHost system property not set");
@ -207,12 +207,12 @@ public class SolrDispatchFilter extends BaseSolrFilter {
request = wrappedRequest.get(); request = wrappedRequest.get();
} }
if (cores.getAuthenticationPlugin() != null) { if (cores.getAuthenticationPlugin() != null) {
log.debug("User principal: "+((HttpServletRequest)request).getUserPrincipal()); log.debug("User principal: {}", ((HttpServletRequest)request).getUserPrincipal());
} }
// No need to even create the HttpSolrCall object if this path is excluded. // No need to even create the HttpSolrCall object if this path is excluded.
if(excludePatterns != null) { if(excludePatterns != null) {
String servletPath = ((HttpServletRequest) request).getServletPath().toString(); String servletPath = ((HttpServletRequest) request).getServletPath();
for (Pattern p : excludePatterns) { for (Pattern p : excludePatterns) {
Matcher matcher = p.matcher(servletPath); Matcher matcher = p.matcher(servletPath);
if (matcher.lookingAt()) { if (matcher.lookingAt()) {
@ -256,7 +256,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
return true; return true;
} else { } else {
try { try {
log.debug("Request to authenticate: "+request+", domain: "+request.getLocalName()+", port: "+request.getLocalPort()); log.debug("Request to authenticate: {}, domain: {}, port: {}", request, request.getLocalName(), request.getLocalPort());
// upon successful authentication, this should call the chain's next filter. // upon successful authentication, this should call the chain's next filter.
authenticationPlugin.doAuthenticate(request, response, new FilterChain() { authenticationPlugin.doAuthenticate(request, response, new FilterChain() {
public void doFilter(ServletRequest req, ServletResponse rsp) throws IOException, ServletException { public void doFilter(ServletRequest req, ServletResponse rsp) throws IOException, ServletException {