01: package org.testng.log;
02:
03: import java.util.logging.LogRecord;
04: import java.util.logging.SimpleFormatter;
05:
06: /**
07: * This class implements a simple TextFormatter because the brainded
08: * default formatter of java.util.logging outputs everything on two
09: * lines and it's ugly as butt.
10: *
11: * @author Cedric Beust, May 2, 2004
12: *
13: */
14: public class TextFormatter extends SimpleFormatter {
15: @Override
16: public synchronized String format(LogRecord record) {
17: StringBuffer result = new StringBuffer();
18:
19: result.append(record.getMessage()).append("\n");
20:
21: return result.toString();
22: }
23:
24: }
|