Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package io.packagecloud.client;
 
 import java.util.Date;
Our customized LogFormatter
public class LogFormatter extends Formatter {
    private static final DateFormat df = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss.SSS");
    public String format(LogRecord record) {
        StringBuilder builder = new StringBuilder(1000);
        builder.append(.format(new Date(record.getMillis()))).append(" ");
        builder.append(record.getLevel()).append(" ");
        builder.append("[").append(record.getSourceClassName()).append(".");
        builder.append(record.getSourceMethodName()).append("] - ");
        builder.append(formatMessage(record));
        builder.append("\n");
        return builder.toString();
    }
    public String getHead(Handler h) {
        return super.getHead(h);
    }
    public String getTail(Handler h) {
        return super.getTail(h);
    }
New to GrepCode? Check out our FAQ X