Home | History | Annotate | Download | only in logging

Lines Matching defs:format

52      * Format the given log record and return the formatted string.
57 * convenience method to localize and format the message field.
62 public abstract String format(LogRecord record);
93 * Localize and format the message string from a log record. This
97 * The message string is first localized to a format string using
100 * format string.) The format String uses java.text style
105 * java.text.MessageFormat is used to format the string.
114 String format = record.getMessage();
118 format = catalog.getString(record.getMessage());
120 // Drop through. Use record message as format
121 format = record.getMessage();
128 // No parameters. Just return format string.
129 return format;
131 // Is it a java.text style format?
133 // Pattern.compile("\\{\\d").matcher(format).find())
136 if (format.indexOf("{0") >= 0 || format.indexOf("{1") >=0 ||
137 format.indexOf("{2") >=0|| format.indexOf("{3") >=0) {
138 return java.text.MessageFormat.format(format, parameters);
140 return format;
143 // Formatting failed: use localized format string.
144 return format;