FileDocCategorySizeDatePackage
VerifierFormatter.javaAPI DocGlassfish v2 API3347Fri May 04 22:33:22 BST 2007com.sun.enterprise.logging

VerifierFormatter

public class VerifierFormatter extends SimpleFormatter
The formatter class to suppress printing Date and Class information in the logged messages. It overrides the format(...) api of SimpleFormatter to provide the implementation.
author
Vikas Awasthi

Fields Summary
private String
lineSeparator
Constructors Summary
Methods Summary
public synchronized java.lang.Stringformat(java.util.logging.LogRecord record)


         
        StringBuilder sb = new StringBuilder();
        StringBuilder text = new StringBuilder();
        sb.append(text);
        sb.append(" ");
        String message = formatMessage(record);
        sb.append(record.getLevel().getLocalizedName());
        sb.append(": ");
        sb.append(message);
        sb.append(lineSeparator);
        if (record.getThrown() != null) {
            try {
                StringWriter sw = new StringWriter();
                PrintWriter pw = new PrintWriter(sw);
                record.getThrown().printStackTrace(pw);
                pw.close();
                sb.append(sw.toString());
            } catch (Exception ex) {
            }
        }
        return sb.toString();