FileFormatter.java
899 Bytes
/*
* Decompiled with CFR 0_118.
*/
package com.scene7.is.ps.provider.logging;
import com.scene7.is.ps.provider.logging.MessageFormatter;
import java.text.FieldPosition;
import java.text.MessageFormat;
import java.util.Date;
import java.util.logging.Handler;
import java.util.logging.LogRecord;
public class FileFormatter
extends MessageFormatter {
private final Date dat = new Date();
private final MessageFormat formatter = new MessageFormat("{0,date} {0,time}");
private final Object[] args = new Object[1];
@Override
public synchronized String format(LogRecord record) {
this.dat.setTime(record.getMillis());
this.args[0] = this.dat;
StringBuffer buffer = new StringBuffer();
this.formatter.format(this.args, buffer, (FieldPosition)null);
buffer.append(' ').append(super.format(record));
return buffer.toString();
}
}