You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Sean Timm (JIRA)" <ji...@apache.org> on 2008/08/07 20:30:46 UTC

[jira] Reopened: (SOLR-554) Hierarchical JDK log level selector for SOLR Admin

     [ https://issues.apache.org/jira/browse/SOLR-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Timm reopened SOLR-554:
----------------------------


Found a bug.  If a synthesized logger is set to OFF, the below exception is thrown.

{noformat}
HTTP ERROR: 500

INTERNAL_SERVER_ERROR

RequestURI=/solr/admin/logging
Caused by:

java.lang.NullPointerException
	at org.apache.solr.servlet.LogLevelSelection.doGet(LogLevelSelection.java:134)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        [...]
{noformat}

The fix is to ensure that the Level returned from getEffectiveLevel is not null.  If it is null, return Level.OFF.

{code}
  private Level getEffectiveLevel( Logger logger ) {
    Level level = logger.getLevel();
    for( Level l : LEVELS ) {
      if( level != null ) {
        return level;
      }
      if( l == null ) { continue; }
      if( logger.isLoggable( l ) ) {
        level = l;
      }
    }
    if( level == null ) {
      level = Level.OFF;
    }
    return level;
  }
{code}

> Hierarchical JDK log level selector for SOLR Admin
> --------------------------------------------------
>
>                 Key: SOLR-554
>                 URL: https://issues.apache.org/jira/browse/SOLR-554
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Sean Timm
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: LogLevelSelection.java, SOLR-554-screenshot-3.jpg, SOLR-554.patch, SOLR-554.patch, SOLR-554.patch
>
>
> An admin web page to allow displaying and setting the log level of  hierarchical loggers from the UI at runtime.  The existing logging.jsp only sets and displays the root log level.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.