Logo Search packages:      
Sourcecode: jaminid version File versions  Download package

SingleLineFormatter.java

package com.prolixtech.utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.logging.LogRecord;

public class SingleLineFormatter extends java.util.logging.SimpleFormatter {

    private DateFormat df = new SimpleDateFormat();

    public String format(LogRecord record) {

        return "# " + (df.format(new java.util.Date(record.getMillis())))
                + " [" + record.getLevel() + "] " + record.getMessage() + "\n";
    }

}

Generated by  Doxygen 1.6.0   Back to index