From 2eb83432771fa001896e89787877d6550ada97ac Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 12 Aug 2009 20:45:53 +0000 Subject: [PATCH] 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 --- .../src/main/java/org/eclipse/jetty/start/Config.java | 5 +++++ .../src/main/java/org/eclipse/jetty/util/log/StdErrLog.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java index 8bcb36ea933..3bc7feaabe6 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Config.java @@ -883,6 +883,11 @@ public class Config if (name.equals("DEBUG")) { 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")) { 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 03c508a8e00..8c204042d8c 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 @@ -30,7 +30,7 @@ public class StdErrLog implements Logger { 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 String _name; private boolean _hideStacks=false; @@ -183,6 +183,7 @@ public class StdErrLog implements Logger return new StdErrLog(_name==null||_name.length()==0?name:_name+"."+name); } + @Override public String toString() { return "StdErrLog:"+_name+":DEBUG="+_debug;