/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package logger.myformatter;

import java.util.Date;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;

/**
 *
 * @author Jan
 */
public class MyFormatter extends SimpleFormatter
{
  private String message;
  private final Date dat = new Date();
  
  @Override
  public String format(LogRecord record)
  {
    dat.setTime(record.getMillis());
    message = "| " + dat + " | " + record.getLevel() + " | "
    + record.getSourceClassName() + " | " + record.getMessage() + " |\n";
    
    return message;
  }
  public MyFormatter()
  {

  }
}