394671: Fix setting loglevel on commandline via -Dorg.eclipse.jetty.LEVEL=DEBUG

This commit is contained in:
Thomas Becker 2012-11-20 16:20:58 +01:00
parent 7771b6e27b
commit 9044819085
3 changed files with 19 additions and 5 deletions

View File

@ -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

View File

@ -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;

View File

@ -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/>