aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Becker2012-11-20 10:20:58 (EST)
committerThomas Becker2012-11-20 10:21:42 (EST)
commit9044819085989745a9d5f96eeca9fafb8cf045ec (patch)
tree9bddb6cad2b724cdcd6aea095c70ebedb5124912
parent7771b6e27b93d30fb68bdbfda932eae173615ef3 (diff)
downloadorg.eclipse.jetty.project-9044819085989745a9d5f96eeca9fafb8cf045ec.zip
org.eclipse.jetty.project-9044819085989745a9d5f96eeca9fafb8cf045ec.tar.gz
org.eclipse.jetty.project-9044819085989745a9d5f96eeca9fafb8cf045ec.tar.bz2
394671: Fix setting loglevel on commandline via -Dorg.eclipse.jetty.LEVEL=DEBUG
-rw-r--r--jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt7
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java15
-rw-r--r--jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java2
3 files changed, 19 insertions, 5 deletions
diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt
index 18df0a2..7272c5f 100644
--- a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt
+++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt
@@ -55,10 +55,11 @@ System Properties:
A Low Level Jetty Logger Implementation to use
(default: org.eclipse.jetty.util.log.Slf4jLog)
- org.eclipse.jetty.util.log.DEBUG=[boolean]
- Debug logging for the stderr and javautil Loggers. Slf4j
+ [name|hierarchy].LEVEL=[loglevel]
+ Change loglevel for the stderr and javautil Loggers. Slf4j
and other loggers must be separately configured for debug.
- (default: false)
+ For example: Dorg.eclipse.jetty.LEVEL=DEBUG
+ (default: INFO)
org.eclipse.jetty.util.log.IGNORED=[boolean]
Ignored exceptions are logged, independent of DEBUG settings
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java b/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java
index 7233a1a..c881911 100644
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java
@@ -106,7 +106,7 @@ public class Log
}
finally
{
- IO.close(in);
+ safeCloseInputStream(in);
}
}
@@ -133,6 +133,19 @@ public class Log
});
}
+ private static void safeCloseInputStream(InputStream in)
+ {
+ try
+ {
+ if (in != null)
+ in.close();
+ }
+ catch (IOException e)
+ {
+ LOG.ignore(e);
+ }
+ }
+
private static Logger LOG;
private static boolean __initialized;
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java b/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java
index 6a25e8e..b1b9cfd 100644
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java
@@ -35,7 +35,7 @@ import org.eclipse.jetty.util.annotation.ManagedObject;
* <p>
* Configuration Properties:
* <dl>
- * <dt>${name|heirarchy}.LEVEL=(ALL|DEBUG|INFO|WARN|OFF)</dt>
+ * <dt>${name|hierarchy}.LEVEL=(ALL|DEBUG|INFO|WARN|OFF)</dt>
* <dd>
* Sets the level that the Logger should log at.<br/>
* Names can be a package name, or a fully qualified class name.<br/>