01: package de.uka.ilkd.key.ocl.gf;
02:
03: import java.util.logging.Formatter;
04: import java.util.logging.LogRecord;
05:
06: /**
07: * @author daniels
08: * A simple Formatter class, that does not introduce linebreaks, so that
09: * continous lines can be read under each other.
10: */
11: public class NoLineBreakFormatter extends Formatter {
12:
13: /**
14: * @see java.util.logging.Formatter#format(java.util.logging.LogRecord)
15: */
16: public String format(LogRecord record) {
17: final String shortLoggerName = record.getLoggerName()
18: .substring(record.getLoggerName().lastIndexOf('.') + 1);
19: return record.getLevel() + " : " + shortLoggerName + " "
20: + record.getSourceMethodName() + " -:- "
21: + record.getMessage() + "\n";
22: }
23: }
|