BEA WebLogic Server Instrukcja Użytkownika Strona 74

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 88
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 73
C Loggable Object Reference for BEA WebLogic Server
C-2 Internationalization Guide
How Loggable Objects Are Used
To create a Logger that provides methods to return Loggable objects, you need to
set the
loggables attribute in the message catalog.
For example, consider the test.xml catalog shown in Listing C-1.
Listing C-1 test.xml Message Catalog
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE message_catalog PUBLIC "weblogic-message-catalog-dtd"
"http://www.bea.com/servers/wls600/msgcat.dtd">
<message_catalog
subsystem="Examples"
version="1.0"
baseid="500000"
endid="500001"
loggables="true"
>
<logmessage
messageid="500000"
severity="error"
method="logIOError(Throwable t)"
>
<messagebody>
IO failure detected.
</messagebody>
<messagedetail>
</messagedetail>
<cause>
</cause>
<action>
</action>
</logmessage>
</message_catalog>
When you run this catalog through the i18ngen utility, a Logger class is created for
this catalog with the following two methods:
logIOError (Throwable)—logs the message
Przeglądanie stron 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 87 88

Komentarze do niniejszej Instrukcji

Brak uwag