Skip to content

Commit

Permalink
394671: Fix setting loglevel on commandline via -Dorg.eclipse.jetty.L…
Browse files Browse the repository at this point in the history
…EVEL=DEBUG
  • Loading branch information
Thomas Becker committed Nov 20, 2012
1 parent 7771b6e commit 9044819
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Object run()
}
finally
{
IO.close(in);
safeCloseInputStream(in);
}
}

Expand All @@ -133,6 +133,19 @@ public Object run()
});
}

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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* <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/>
Expand Down

0 comments on commit 9044819

Please sign in to comment.