mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
237bfa3137
commit
d31c09caf8
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
Loading…
Reference in New Issue