code: protected String format(LogRecord record)
    {
      if (! isLoggable(record)) {
        return null;
      }
      
      StringBuilder sb = new StringBuilder();
      
      if (record == null) {
        sb.append("no record");
            
        if (isNullDelimited()) {
          sb.append('\0');
        }
  
        return sb.toString();
      }
  
      try {
        Formatter formatter = getFormatter();
        
        if (formatter != null) {
          String value = formatter.format(record);
    
          sb.append(value).append('\n');
          
          if (isNullDelimited()) {
            sb.append('\0');
          }
            
          return sb.toString();
        }
          
        String message = record.getMessage();
        Throwable thrown = record.getThrown();
          
        if (thrown == null
            && message != null
            && message.indexOf("java.lang.NullPointerException") >= 0) {
          thrown = new IllegalStateException();
          thrown.fillInStackTrace();
        }
              
        if (thrown != null) {
          if (message != null
              && ! message.equals(thrown.toString()) 
              && ! message.equals(thrown.getMessage())) {
            printMessage(sb, message, record.getParameters());
          }
            
          StringWriter writer = new StringWriter();
          PrintWriter pw = new PrintWriter(writer);
          thrown.printStackTrace(pw);
          pw.close();
          
          sb.append(writer.toString());
        }
        else {
          printMessage(sb, message, record.getParameters());
        }
  
        /*
        TimestampFilter timestamp = getTimestampFilter();
        if (timestamp != null) {
          sb = timestamp.format(sb);
        }
        */
          
        if (isNullDelimited()) {
          sb.append('\0');
        }
      } catch (Throwable e) {
        e.printStackTrace();
      }
  
      return sb.toString();
    }
docs: /*
  public TimestampFilter getTimestampFilter()
  {
  return null;
  }