Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-1257: removed logging.jsp and refrences to it in admin.jsp

Chris M. Hostetterd31c09caf8b6
diff --git a/CHANGES.txt b/CHANGES.txt
index 5f9a70bc9a0..e14c07bf333 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -537,6 +537,12 @@ Other Changes
40. SOLR-1233: remove /select?qt=/whatever restriction on /-prefixed request handlers.
(ehatcher)
+41. SOLR-1257: logging.jsp has been removed and now passes through to the
+ hierarchical log level tool added in Solr 1.3. Users still
+ hitting "/admin/logging.jsp" should switch to "/admin/logging".
+ (hossman)
+
+
Build
----------------------
1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)
diff --git a/src/webapp/web/WEB-INF/web.xml b/src/webapp/web/WEB-INF/web.xml
index 058fca49e24..b3aa9152712 100644
--- a/src/webapp/web/WEB-INF/web.xml
+++ b/src/webapp/web/WEB-INF/web.xml
@@ -132,6 +132,12 @@
<servlet-name>ping</servlet-name>
<url-pattern>/admin/ping</url-pattern>
</servlet-mapping>
+
+ <!-- @Deprecated -->
+ <servlet-mapping>
+ <servlet-name>Logging</servlet-name>
+ <url-pattern>/admin/logging.jsp</url-pattern>
+ </servlet-mapping>
<mime-mapping>
<extension>.xsl</extension>
diff --git a/src/webapp/web/admin/action.jsp b/src/webapp/web/admin/action.jsp
index a549f5f58db..75ec5d6c566 100644
--- a/src/webapp/web/admin/action.jsp
+++ b/src/webapp/web/admin/action.jsp
@@ -22,13 +22,10 @@
java.net.InetAddress,
java.net.UnknownHostException"%>
<%@ page import="java.util.Date"%>
-<%@ page import="java.util.logging.Level"%>
-<%@ page import="java.util.logging.Logger"%>
<%@include file="header.jsp" %>
<%
String action = request.getParameter("action");
- String logging = request.getParameter("log");
String enableActionStatus = "";
boolean isValid = false;
@@ -37,10 +34,6 @@
if ("Enable".compareTo(action) == 0) isValid = true;
if ("Disable".compareTo(action) == 0) isValid = true;
}
- if (logging != null) {
- action = "Set Log Level";
- isValid = true;
- }
if (isValid) {
if ("Enable".compareTo(action) == 0) {
try {
@@ -70,26 +63,11 @@
enableActionStatus += "Disable Failed: " + e.toString();
}
}
- if (logging != null) {
- try {
- Logger log = SolrCore.log;
- Logger parent = log.getParent();
- while (parent != null) {
- log = parent;
- parent = log.getParent();
- }
- log.setLevel(Level.parse(logging));
- enableActionStatus = "Set Log Level (" + logging + ") Succeeded";
- } catch(Exception e) {
- enableActionStatus += "Set Log Level (" + logging + ") Failed: "
- + e.toString();
- }
- }
} else {
enableActionStatus = "Illegal Action";
}
// :TODO: might want to rework this so any logging change happens *after*
- SolrCore.log.log(Level.INFO, enableActionStatus);
+ SolrCore.log.info(enableActionStatus);
%>
<br clear="all">
<table>
diff --git a/src/webapp/web/admin/logging.jsp b/src/webapp/web/admin/logging.jsp
deleted file mode 100644
index 85f0c4d501e..00000000000
--- a/src/webapp/web/admin/logging.jsp
+++ /dev/null
@@ -1,50 +0,0 @@
-<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
-<%--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
---%>
-<%@ page import="org.apache.solr.core.SolrCore,
- org.apache.solr.schema.IndexSchema,
- java.io.File,
- java.net.InetAddress,
- java.net.UnknownHostException"%>
-<%@ page import="java.util.Date"%>
-<%@ page import="java.util.logging.Level"%>
-<%@ page import="java.util.logging.LogManager"%>
-<%@ page import="java.util.logging.Logger"%>
-
-<?xml-stylesheet type="text/xsl" href="logging.xsl"?>
-<%@include file="_info.jsp" %>
-
-<%
- Logger log = SolrCore.log;
- Logger parent = log.getParent();
- while(parent != null) {
- log = parent;
- parent = log.getParent();
- }
- Level lvl = log.getLevel();
-
-%>
-<solr>
- <core><%=core.getName()%></core>
- <logging>
-<% if (lvl != null) {%>
- <logLevel><%= lvl.toString() %></logLevel>
-<% } else { %>
- <logLevel>null</logLevel>
-<% } %>
- </logging>
-</solr>
diff --git a/src/webapp/web/admin/logging.xsl b/src/webapp/web/admin/logging.xsl
deleted file mode 100644
index 39c246e81fe..00000000000
--- a/src/webapp/web/admin/logging.xsl
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!-- $Id$ -->
-<!-- $URL$ -->
-
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
- <xsl:output
- method="html"
- indent="yes"
- encoding="utf-8"
- media-type="text/html; charset=UTF-8"
- doctype-public="-//W3C//DTD HTML 4.01//EN"
- doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
-
- <xsl:template match="/">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
- <link rel="icon" href="favicon.ico" type="image/ico"></link>
- <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
- <title>Solr Admin: Logging</title>
- </head>
- <body>
- <a href="">
- <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR">
- </img>
- </a>
- <h1>Solr Admin (<xsl:value-of select="solr/meta/collection" />)</h1>
- <div style="margin-top: 1em;">
- <xsl:apply-templates/>
- <div>
- </div>
- <a href=".">Return to Admin Page</a>
- </div>
- </body>
- </html>
- </xsl:template>
-
- <xsl:include href="meta.xsl"/>
-
- <xsl:template match="solr/logging">
-
-<br clear="all"/>
-<h2>Solr Logging</h2>
-<table>
- <tr>
- <td>
- <H3>Log Level:</H3>
- </td>
- <td>
-<xsl:value-of select="logLevel" />
- </td>
- </tr>
- <tr>
- <td>
- Set Level
- </td>
- <td>
- [<a href="action.jsp?log=ALL">ALL</a>]
- [<a href="action.jsp?log=CONFIG">CONFIG</a>]
- [<a href="action.jsp?log=FINE">FINE</a>]
- [<a href="action.jsp?log=FINER">FINER</a>]
- [<a href="action.jsp?log=FINEST">FINEST</a>]
- [<a href="action.jsp?log=INFO">INFO</a>]
- [<a href="action.jsp?log=OFF">OFF</a>]
- [<a href="action.jsp?log=SEVERE">SEVERE</a>]
- [<a href="action.jsp?log=WARNING">WARNING</a>]
- </td>
- </tr>
-</table>
-
- </xsl:template>
-</xsl:stylesheet>