Fixing DEBUG per discussion on jetty-dev

* if DEBUG=true is provided on start.jar, then
  System property org.eclipse.jetty.util.log.stderr.DEBUG = true
  System property org.eclipse.jetty.start.DEBUG = true

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@705 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Joakim Erdfelt 2009-08-12 20:45:53 +00:00
parent 0f56762ce8
commit 2eb8343277
2 changed files with 7 additions and 1 deletions

View File

@ -883,6 +883,11 @@ public class Config
if (name.equals("DEBUG")) if (name.equals("DEBUG"))
{ {
DEBUG = Boolean.parseBoolean(value); DEBUG = Boolean.parseBoolean(value);
if (DEBUG)
{
System.setProperty("org.eclipse.jetty.util.log.stderr.DEBUG","true");
System.setProperty("org.eclipse.jetty.start.DEBUG","true");
}
} }
if (name.equals("OPTIONS")) if (name.equals("OPTIONS"))
{ {

View File

@ -30,7 +30,7 @@ public class StdErrLog implements Logger
{ {
private static DateCache _dateCache; private static DateCache _dateCache;
private final static boolean __debug = Boolean.parseBoolean(System.getProperty("org.eclipse.jetty.util.log.DEBUG","false")); private final static boolean __debug = Boolean.parseBoolean(System.getProperty("org.eclipse.jetty.util.log.stderr.DEBUG","false"));
private boolean _debug = __debug; private boolean _debug = __debug;
private String _name; private String _name;
private boolean _hideStacks=false; private boolean _hideStacks=false;
@ -183,6 +183,7 @@ public class StdErrLog implements Logger
return new StdErrLog(_name==null||_name.length()==0?name:_name+"."+name); return new StdErrLog(_name==null||_name.length()==0?name:_name+"."+name);
} }
@Override
public String toString() public String toString()
{ {
return "StdErrLog:"+_name+":DEBUG="+_debug; return "StdErrLog:"+_name+":DEBUG="+_debug;