The recommended way to localize messages is to log a message id. Log events should then be recorded without formatting into a data store. The application that is used to read the events and display them to the user can then localize and format the messages for the end user.
| Modifier and Type | Field and Description |
|---|---|
| private transient Object[] | |
| private String | |
| private String | |
| private String | |
| private final Locale | |
| private transient StatusLogger | |
| private String | |
| private transient ResourceBundle | |
| private static final long | |
| private String[] | |
| private transient Throwable |
| Access | Constructor and Description |
|---|---|
| public | LocalizedMessage(final String
the message pattern that to be checked for placeholders. messagePattern, final Object[] the argument array to be converted. arguments)Constructor with message pattern and arguments. |
| public | |
| public | |
| public | LocalizedMessage(final String baseName, final Locale locale, final String key, final Object[] arguments)
|
| public | LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object[] arguments)
|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object arg)
|
| public | |
| public | |
| public | |
| public | LocalizedMessage(final ResourceBundle bundle, final String key, final Object arg1, final Object arg2)
|
| public | |
| public | LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object arg1, final Object arg2)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getFormat()
Implements org. Gets the format portion of the Message. |
| public String | Returns: The formatted message String.Implements org. Returns the formatted message after looking up the format in the resource bundle. |
| public String | Returns: the name of the Logger.Implements org. Returns the name of the Logger. |
| public Object[] | getParameters()
Implements org. Gets parameter values, if any. |
| protected ResourceBundle | Returns: The ResourceBundle.The base name of the resource bundle, a fully qualified class name. rbBaseName, final Locale The locale to use when formatting the message. resourceBundleLocale, final boolean If true the key will be treated as a package or class name and a resource bundle will be located
based on all or part of the package name. If false the key is expected to be the exact bundle id. loop)Override this to use a ResourceBundle.Control in Java 6 |
| public Throwable | getThrowable()
Implements org. Gets the throwable, if any. |
| private void | |
| public void | setLoggerName(final String
The name of the Logger. name)Implements org. Set the name of the Logger. |
| public String | |
| private void |
| argArray | back to summary |
|---|---|
| private transient Object[] argArray | |
| baseName | back to summary |
|---|---|
| private String baseName | |
| formattedMessage | back to summary |
|---|---|
| private String formattedMessage | |
| key | back to summary |
|---|---|
| private String key | |
| locale | back to summary |
|---|---|
| private final Locale locale | |
| logger | back to summary |
|---|---|
| private transient StatusLogger logger | |
| loggerName | back to summary |
|---|---|
| private String loggerName | |
| resourceBundle | back to summary |
|---|---|
| private transient ResourceBundle resourceBundle | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| stringArgs | back to summary |
|---|---|
| private String[] stringArgs | |
| throwable | back to summary |
|---|---|
| private transient Throwable throwable | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String messagePattern, final Object[] arguments) Constructor with message pattern and arguments. | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String baseName, final String key, final Object[] arguments) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final ResourceBundle bundle, final String key, final Object[] arguments) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String baseName, final Locale locale, final String key, final Object[] arguments) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object[] arguments) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final Locale locale, final String key, final Object[] arguments) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String messagePattern, final Object arg) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String baseName, final String key, final Object arg) | |
| LocalizedMessage | back to summary |
|---|---|
public LocalizedMessage(final ResourceBundle bundle, final String key)
| |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final ResourceBundle bundle, final String key, final Object arg) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String baseName, final Locale locale, final String key, final Object arg) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object arg) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final Locale locale, final String key, final Object arg) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String messagePattern, final Object arg1, final Object arg2) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String baseName, final String key, final Object arg1, final Object arg2) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final ResourceBundle bundle, final String key, final Object arg1, final Object arg2) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final String baseName, final Locale locale, final String key, final Object arg1, final Object arg2) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object arg1, final Object arg2) | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(final Locale locale, final String key, final Object arg1, final Object arg2) | |
| getFormat | back to summary |
|---|---|
| public String getFormat() Implements org. Doc from org. Gets the format portion of the Message.
| |
| getFormattedMessage | back to summary |
|---|---|
| public String getFormattedMessage() Implements org. Returns the formatted message after looking up the format in the resource bundle. | |
| getLoggerName | back to summary |
|---|---|
| public String getLoggerName() Implements org. Returns the name of the Logger. | |
| getParameters | back to summary |
|---|---|
| public Object[] getParameters() Implements org. Doc from org. Gets parameter values, if any. | |
| getResourceBundle | back to summary |
|---|---|
| protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale, final boolean loop) Override this to use a ResourceBundle.Control in Java 6
| |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() Implements org. Doc from org. Gets the throwable, if any. | |
| readObject | back to summary |
|---|---|
| private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException | |
| setLoggerName | back to summary |
|---|---|
| public void setLoggerName(final String name) Implements org. Set the name of the Logger. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| writeObject | back to summary |
|---|---|
| private void writeObject(final ObjectOutputStream out) throws IOException | |