@Override public synchronized String format(LogRecord record){
  StringBuffer sb=new StringBuffer();
  String[] array=parseLogRecord(record);
  String type=array[0];
  String text=array[1];
  date.setTime(record.getMillis());
  sb.append(formater.format(date));
  sb.append(" ");
  sb.append(formatJavaName(record.getSourceClassName(),60));
  sb.append(" ");
  sb.append(type);
  sb.append(" ");
  sb.append(formatJavaName(record.getSourceMethodName(),30));
  sb.append(" ");
  sb.append(text);
  sb.append(NL);
  Throwable thrown=record.getThrown();
  if (thrown != null) {
    try {
      StringWriter sw=new StringWriter();
      PrintWriter pw=new PrintWriter(sw);
      thrown.printStackTrace(pw);
      pw.close();
      sb.append(sw.toString());
    }
 catch (    Exception ex) {
    }
  }
  return sb.toString();
}

@ Override public synchronized String format ( LogRecord record ) { StringBuffer sb = new StringBuffer ( ) ; String [ ] array = parseLogRecord ( record ) ; String type = array [ 0 ] ; String text = array [ 1 ] ; date . setTime ( record . getMillis ( ) ) ; sb . append ( formater . format ( date ) ) ; sb . append ( " " ) ; sb . append ( formatJavaName ( record . getSourceClassName ( ) , 60 ) ) ; sb . append ( " " ) ; sb . append ( type ) ; sb . append ( " " ) ; sb . append ( formatJavaName ( record . getSourceMethodName ( ) , 30 ) ) ; sb . append ( " " ) ; sb . append ( text ) ; sb . append ( NL ) ; Throwable thrown = record . getThrown ( ) ; if ( thrown != null ) { try { StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw ) ; thrown . printStackTrace ( pw ) ; pw . close ( ) ; sb . append ( sw . toString ( ) ) ; } catch ( Exception ex ) { } } return sb . toString ( ) ; }
format the given logrecord .
