From d31c09caf8b6bb3d5121904f9948073bf86fead2 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Thu, 9 Jul 2009 19:23:59 +0000 Subject: [PATCH] SOLR-1257: removed logging.jsp and refrences to it in admin.jsp git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@792643 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 6 +++ src/webapp/web/WEB-INF/web.xml | 6 +++ src/webapp/web/admin/action.jsp | 24 +-------- src/webapp/web/admin/logging.jsp | 50 ------------------ src/webapp/web/admin/logging.xsl | 91 -------------------------------- 5 files changed, 13 insertions(+), 164 deletions(-) delete mode 100644 src/webapp/web/admin/logging.jsp delete mode 100644 src/webapp/web/admin/logging.xsl 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 @@ ping /admin/ping + + + + Logging + /admin/logging.jsp + .xsl 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); %>
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"%> - - -<%@include file="_info.jsp" %> - -<% - Logger log = SolrCore.log; - Logger parent = log.getParent(); - while(parent != null) { - log = parent; - parent = log.getParent(); - } - Level lvl = log.getLevel(); - -%> - - <%=core.getName()%> - -<% if (lvl != null) {%> - <%= lvl.toString() %> -<% } else { %> - null -<% } %> - - 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 @@ - - - - - - - - - - - - - - - - Solr Admin: Logging - - - - SOLR - - -

Solr Admin ()

- - - -
- - - - - -
-

Solr Logging

-
- - - - - - - - -
-

Log Level:

-
- -
- Set Level - - [ALL] - [CONFIG] - [FINE] - [FINER] - [FINEST] - [INFO] - [OFF] - [SEVERE] - [WARNING] -
- - -