From 19f94bf59f4fe201ecad54ef1afd8b3fe8791179 Mon Sep 17 00:00:00 2001 From: Otis Gospodnetic Date: Wed, 17 Sep 2008 18:02:07 +0000 Subject: [PATCH] SOLR-774 - fixed logging level display git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@696381 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../src/org/apache/solr/servlet/LogLevelSelection.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 316b8002501..7f1bcf823b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -38,6 +38,7 @@ Optimizations Bug Fixes ---------------------- + 1. SOLR-774: Fixed logging level display (Sean Timm via Otis Gospodnetic) Build ---------------------- diff --git a/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java b/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java index 78d9d44ee63..ee97f1c1e8e 100644 --- a/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java +++ b/src/webapp/src/org/apache/solr/servlet/LogLevelSelection.java @@ -227,13 +227,15 @@ public final class LogLevelSelection extends HttpServlet { } for (Level l : LEVELS) { if (l == null) { + // avoid NPE continue; } if (logger.isLoggable(l)) { - level = l; + // return first level loggable + return l; } } - return level != null ? level : Level.OFF; + return Level.OFF; } private static class LogWrapper