suppress stacks

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1505 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-04-13 15:30:02 +00:00
parent df76674be5
commit 8e7f8f8c1c
2 changed files with 4 additions and 3 deletions

View File

@ -132,7 +132,7 @@ public class StdErrLog implements Logger
tag(d,ms,":DBUG:");
format(msg);
if (_hideStacks)
format(th.toString());
format(String.valueOf(th));
else
format(th);
System.err.println(_buffer.toString());
@ -203,7 +203,7 @@ public class StdErrLog implements Logger
tag(d,ms,":WARN:");
format(msg);
if (_hideStacks)
format(th.toString());
format(String.valueOf(th));
else
format(th);
System.err.println(_buffer.toString());

View File

@ -24,6 +24,7 @@ public class StdErrLogTest extends TestCase
{
StdErrLog log = new StdErrLog();
log.setDebugEnabled(true);
log.setHideStacks(true);
try {
log.info("Testing info(msg,null,null) - {} {}",null,null);
@ -52,9 +53,9 @@ public class StdErrLogTest extends TestCase
}
catch (NullPointerException npe)
{
assertTrue("NullPointerException in StdErrLog.", false);
System.err.println(npe);
npe.printStackTrace();
assertTrue("NullPointerException in StdErrLog.", false);
}
}
}