import java.util.logging.Formatter;
import java.util.logging.LogRecord;
public class CustomFormatter extends Formatter {
public synchronized String format(LogRecord record) {
String methodName = record.getSourceMethodName();
String message = record.getMessage();
StringBuffer buffer = new StringBuffer(50);
buffer.append(methodName);
buffer.append("=");
buffer.append(message);
return buffer.toString();
}
}
|