363785 - StdErrLog must use system-dependent EOL.

This commit is contained in:
Simone Bordet 2011-11-15 10:19:10 +01:00
parent be9597f8f2
commit 46aad20248
1 changed files with 18 additions and 17 deletions

View File

@ -37,6 +37,7 @@ import org.eclipse.jetty.util.DateCache;
*/
public class StdErrLog implements Logger
{
private static final String EOL = System.getProperty("line.separator");
private static DateCache _dateCache;
private static Properties __props = Log.__props;
@ -551,19 +552,19 @@ public class StdErrLog implements Logger
}
else
{
buffer.append('\n');
buffer.append(EOL);
format(buffer,thrown.toString());
StackTraceElement[] elements = thrown.getStackTrace();
for (int i = 0; elements != null && i < elements.length; i++)
{
buffer.append("\n\tat ");
buffer.append(EOL).append("\tat ");
format(buffer,elements[i].toString());
}
Throwable cause = thrown.getCause();
if (cause != null && cause != thrown)
{
buffer.append("\nCaused by: ");
buffer.append(EOL).append("Caused by: ");
format(buffer,cause);
}
}