Skip to content

Commit 9044819

Browse files
author
Thomas Becker
committed
394671: Fix setting loglevel on commandline via -Dorg.eclipse.jetty.LEVEL=DEBUG
1 parent 7771b6e commit 9044819

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ System Properties:
5555
A Low Level Jetty Logger Implementation to use
5656
(default: org.eclipse.jetty.util.log.Slf4jLog)
5757

58-
org.eclipse.jetty.util.log.DEBUG=[boolean]
59-
Debug logging for the stderr and javautil Loggers. Slf4j
58+
[name|hierarchy].LEVEL=[loglevel]
59+
Change loglevel for the stderr and javautil Loggers. Slf4j
6060
and other loggers must be separately configured for debug.
61-
(default: false)
61+
For example: Dorg.eclipse.jetty.LEVEL=DEBUG
62+
(default: INFO)
6263

6364
org.eclipse.jetty.util.log.IGNORED=[boolean]
6465
Ignored exceptions are logged, independent of DEBUG settings

jetty-util/src/main/java/org/eclipse/jetty/util/log/Log.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public Object run()
106106
}
107107
finally
108108
{
109-
IO.close(in);
109+
safeCloseInputStream(in);
110110
}
111111
}
112112

@@ -133,6 +133,19 @@ public Object run()
133133
});
134134
}
135135

136+
private static void safeCloseInputStream(InputStream in)
137+
{
138+
try
139+
{
140+
if (in != null)
141+
in.close();
142+
}
143+
catch (IOException e)
144+
{
145+
LOG.ignore(e);
146+
}
147+
}
148+
136149
private static Logger LOG;
137150
private static boolean __initialized;
138151

jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* <p>
3636
* Configuration Properties:
3737
* <dl>
38-
* <dt>${name|heirarchy}.LEVEL=(ALL|DEBUG|INFO|WARN|OFF)</dt>
38+
* <dt>${name|hierarchy}.LEVEL=(ALL|DEBUG|INFO|WARN|OFF)</dt>
3939
* <dd>
4040
* Sets the level that the Logger should log at.<br/>
4141
* Names can be a package name, or a fully qualified class name.<br/>

0 commit comments

Comments
 (0)