org.x4juli.formatter.helper
Class FormatterUtil

java.lang.Object
  extended byorg.x4juli.formatter.helper.FormatterUtil

public final class FormatterUtil
extends java.lang.Object

Utility methods for formatting purposes.

Since:
0.5
Author:
Boris Unckel

Constructor Summary
private FormatterUtil()
          No instanciation wanted.
 
Method Summary
private static java.lang.String appendParamsToString(java.lang.String format, java.lang.Object[] parameters)
           
static java.lang.String formatMessage(ExtendedLogRecord record)
          A fully independent formatting of the raw Message.
static java.lang.String formatMessage(java.util.logging.LogRecord record)
          Uses java.util.logging.Formatter to format a message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatterUtil

private FormatterUtil()
No instanciation wanted.

Method Detail

formatMessage

public static java.lang.String formatMessage(java.util.logging.LogRecord record)
Uses java.util.logging.Formatter to format a message.

Parameters:
record - to format.
Returns:
the localized, formatted message as String.
See Also:
Formatter.formatMessage(java.util.logging.LogRecord)

formatMessage

public static java.lang.String formatMessage(ExtendedLogRecord record)
A fully independent formatting of the raw Message. If the raw message does not contain any java.text parameters like {0} or the ResourceBundle is missing key and value, the parameters are appended on the raw message with [No=Value].

Parameters:
record - containing raw message and optional parameters.
Returns:
the formatted message String.

appendParamsToString

private static java.lang.String appendParamsToString(java.lang.String format,
                                                     java.lang.Object[] parameters)


${license_html}