diff --git a/source/net/yacy/http/Jetty8YaCyDefaultServlet.java b/source/net/yacy/http/Jetty8YaCyDefaultServlet.java index 2153ce657..ee66d4054 100644 --- a/source/net/yacy/http/Jetty8YaCyDefaultServlet.java +++ b/source/net/yacy/http/Jetty8YaCyDefaultServlet.java @@ -1,19 +1,25 @@ +// Jetty8YaCyDefaultServlet +// ------------------------ +// Copyright 2013 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany +// First released 2013 at http://yacy.net +// +// $LastChangedDate$ +// $LastChangedRevision$ +// $LastChangedBy$ // -// ======================================================================== -// Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program in the file lgpl21.txt +// If not, see . // package net.yacy.http; @@ -172,8 +178,8 @@ public class Jetty8YaCyDefaultServlet extends YaCyDefaultServlet implements Reso } } - if (ConcurrentLog.isFine("YaCyDefaultServlet")) { - ConcurrentLog.fine("YaCyDefaultServlet","uri=" + request.getRequestURI() + " resource=" + resource + (content != null ? " content" : "")); + if (ConcurrentLog.isFine("FILEHANDLER")) { + ConcurrentLog.fine("FILEHANDLER","YaCyDefaultServlet: uri=" + request.getRequestURI() + " resource=" + resource + (content != null ? " content" : "")); } // Handle resource @@ -233,7 +239,7 @@ public class Jetty8YaCyDefaultServlet extends YaCyDefaultServlet implements Reso } } // else look for a welcome file else if (null != (welcome = getWelcomeFile(pathInContext))) { - ConcurrentLog.fine("welcome={}", welcome); + ConcurrentLog.fine("FILEHANDLER","welcome={}" + welcome); // Forward to the index @@ -494,7 +500,7 @@ public class Jetty8YaCyDefaultServlet extends YaCyDefaultServlet implements Reso writeHeaders(response, content, -1); String mimetype = (content.getContentType() == null ? null : content.getContentType().toString()); if (mimetype == null) { - ConcurrentLog.warn("YaCyDefaultServlet", "Unknown mimetype for " + request.getRequestURI()); + ConcurrentLog.warn("FILEHANDLER","YaCyDefaultServlet: Unknown mimetype for " + request.getRequestURI()); } MultiPartOutputStream multi = new MultiPartOutputStream(out); response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT); diff --git a/source/net/yacy/http/TemplateHandler.java b/source/net/yacy/http/TemplateHandler.java index 8cd83f358..156489561 100644 --- a/source/net/yacy/http/TemplateHandler.java +++ b/source/net/yacy/http/TemplateHandler.java @@ -82,8 +82,8 @@ import org.eclipse.jetty.server.handler.AbstractHandler; */ public class TemplateHandler extends AbstractHandler implements Handler { - private String htLocalePath = "DATA/LOCALE/htroot"; - private String htDefaultPath = "htroot"; + private final String htLocalePath = "DATA/LOCALE/htroot"; + private final String htDefaultPath = "htroot"; private String htDocsPath = "DATA/HTDOCS"; private static final serverClassLoader provider = new serverClassLoader(/*this.getClass().getClassLoader()*/); @@ -156,10 +156,10 @@ public class TemplateHandler extends AbstractHandler implements Handler { templateMethodCache.put(classFile, new SoftReference(m)); } catch (final ClassNotFoundException e) { - ConcurrentLog.severe("TemplateHandler", "class " + classFile + " is missing:" + e.getMessage()); + ConcurrentLog.severe("HTTPDFileHandler", "class " + classFile + " is missing:" + e.getMessage()); throw new InvocationTargetException(e, "class " + classFile + " is missing:" + e.getMessage()); } catch (final NoSuchMethodException e) { - ConcurrentLog.severe("TemplateHandler", "method 'respond' not found in class " + classFile + ": " + e.getMessage()); + ConcurrentLog.severe("HTTPDFileHandler", "method 'respond' not found in class " + classFile + ": " + e.getMessage()); throw new InvocationTargetException(e, "method 'respond' not found in class " + classFile + ": " + e.getMessage()); } return m; diff --git a/source/net/yacy/http/YaCyDefaultServlet.java b/source/net/yacy/http/YaCyDefaultServlet.java index 8cf1e81f3..1a745e3df 100644 --- a/source/net/yacy/http/YaCyDefaultServlet.java +++ b/source/net/yacy/http/YaCyDefaultServlet.java @@ -179,8 +179,8 @@ public abstract class YaCyDefaultServlet extends HttpServlet { _etags = getInitBoolean("etags", _etags); _gzip=getInitBoolean("gzip",_gzip); - if (ConcurrentLog.isFine("YaCyDefaultServlet")) { - ConcurrentLog.fine("YaCyDefaultServlet","resource base = " + _resourceBase); + if (ConcurrentLog.isFine("FILEHANDLER")) { + ConcurrentLog.fine("FILEHANDLER","YaCyDefaultServlet: resource base = " + _resourceBase); } templateMethodCache = new ConcurrentHashMap>(); } @@ -222,8 +222,8 @@ public abstract class YaCyDefaultServlet extends HttpServlet { r = Resource.newResource(u); } - if (ConcurrentLog.isFine("YaCyDefaultServlet")) { - ConcurrentLog.fine("YaCyDefaultServlet","Resource " + pathInContext + "=" + r); + if (ConcurrentLog.isFine("FILEHANDLER")) { + ConcurrentLog.fine("FILEHANDLER","YaCyDefaultServlet: Resource " + pathInContext + "=" + r); } } catch (IOException e) { // ConcurrentLog.logException(e); @@ -286,8 +286,8 @@ public abstract class YaCyDefaultServlet extends HttpServlet { // find resource resource = getResource(pathInContext); - if (ConcurrentLog.isFine("YaCyDefaultServlet")) { - ConcurrentLog.fine("YaCyDefaultServlet","uri=" + request.getRequestURI() + " resource=" + resource + (content != null ? " content" : "")); + if (ConcurrentLog.isFine("FILEHANDLER")) { + ConcurrentLog.fine("FILEHANDLER","YaCyDefaultServlet: uri=" + request.getRequestURI() + " resource=" + resource + (content != null ? " content" : "")); } // Handle resource @@ -553,10 +553,10 @@ public abstract class YaCyDefaultServlet extends HttpServlet { templateMethodCache.put(classFile, new SoftReference(m)); } catch (final ClassNotFoundException e) { - ConcurrentLog.severe("YaCyDefaultServlet", "class " + classFile + " is missing:" + e.getMessage()); + ConcurrentLog.severe("FILEHANDLER","YaCyDefaultServlet: class " + classFile + " is missing:" + e.getMessage()); throw new InvocationTargetException(e, "class " + classFile + " is missing:" + e.getMessage()); } catch (final NoSuchMethodException e) { - ConcurrentLog.severe("YaCyDefaultServlet", "method 'respond' not found in class " + classFile + ": " + e.getMessage()); + ConcurrentLog.severe("FILEHANDLER","YaCyDefaultServlet: method 'respond' not found in class " + classFile + ": " + e.getMessage()); throw new InvocationTargetException(e, "method 'respond' not found in class " + classFile + ": " + e.getMessage()); } return m; diff --git a/source/net/yacy/http/YaCyProxyServlet.java b/source/net/yacy/http/YaCyProxyServlet.java index 078dbdb7a..6e022552d 100644 --- a/source/net/yacy/http/YaCyProxyServlet.java +++ b/source/net/yacy/http/YaCyProxyServlet.java @@ -219,7 +219,7 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet { continue; } } catch (final MalformedURLException e) { - ConcurrentLog.fine("ProxyServlet", "malformed url for url-rewirte " + url); + ConcurrentLog.fine("PROXY","ProxyServlet: malformed url for url-rewirte " + url); continue; } } @@ -237,7 +237,7 @@ public class YaCyProxyServlet extends ProxyServlet implements Servlet { continue; } } catch (MalformedURLException ex) { - ConcurrentLog.fine("ProxyServlet", "malformed url for url-rewirte " + complete_url); + ConcurrentLog.fine("PROXY","ProxyServlet: malformed url for url-rewirte " + complete_url); continue; } }