Using Message Arguments - BEA WebLogic Server Manual

Internationalization guide
Hide thumbs Also See for BEA WebLogic Server:
Table of Contents

Advertisement

2
Using Message Catalogs with BEA WebLogic Server

Using Message Arguments

The message body, message detail, cause, and action sections of a log message can
include message arguments, as described by
message body section in a simple message can include arguments. Arguments are
values that can be dynamically set at runtime. These values are passed to routines, such
as printing out a message. A message can support up to 10 arguments, numbered 0-9.
You can include any subset of these arguments in any text section of the message
definition, although the message body should include all of the arguments. You insert
message arguments into a message definition during development, and these
arguments are replaced by the appropriate message content at runtime when the
message is logged.
The following excerpt from an XML log message definition shows how you can use
message arguments. The argument number must correspond to one of the arguments
specified in the
the second, and so on.
Listing 2-1 Example of Message Arguments
<messagebody>Unable to open file, {0}.</messagebody>
2-4
Internationalization Guide
Java allows you to group classes into a collection called a package. A package
name should be consistent with the name of the subsystem in which a particular
catalog resides.
The log Localizer "classes" are actually
attribute. Specifically,
method
<messagedetail>
File, {0} does not exist. The server will restore the file
contents from {1}, resulting in the use of default values
for all future requests.
</messagedetail>
<cause>The file was deleted</cause>
<action>
If this error repeats then investigate unauthorized access to
the file system.
</action>
property files.
ResourceBundle
java.text.MessageFormat
with the first argument,
{0}
. Only the
with
{1}

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BEA WebLogic Server and is the answer not in the manual?

Table of Contents

Save PDF