...
Nexaweb server and client generate various types of application messages that you can use to debug your application. In addition, you can specify a log-level at which Nexaweb displays the content of these messages.
Nexaweb displays these various types of application messages at the Nexaweb console and stores them in a ServletContext log on your Web application server.
Nexaweb appends the message type to the beginning of any messages that the application generates, so that you can determine what part of the application generated the mesage.
Application Messages
Nexaweb Server and Client generate application message types differently. The Nexaweb server generates a default set of message types and additional types based upon the Nexaweb features that your application uses. Nexaweb client generates a default set of message types only.
Nexaweb Server and Client generate the following types of application messages by default:
Message Type | Description | Server or Client |
Macrohandler | Messages about the definition of Macros. | Both |
Messaging | Messages not handled by the application's MessageListener class. | Both |
FormatUtils | Messages about Nexaweb's automatic type conversion. | Both |
XUpdate | Messages detailing the results of XUpdate statements. | Both |
Macro | Messages about a Macro's execution. | Client |
WebServicesBroker | Messages about web services. | Client |
PrintService | Messages about PDF Printing. | Server, Desktopclient |
To determine a complete list of the types of application messages that the Nexaweb server generates, access the Nexaweb Server Management console as follows:
- Enter <application-context>/Nexaweb/Services in the Address/Location field of a browser, or
Press the F3 Key from any running Nexaweb client application.
The Nexaweb Server Management console page appears. - Click Log Names under Reports on the right side of the page.
The Nexaweb Server Management console page displays a list of all of the log names currently in use.
Message Log Levels
Nexaweb provides a number of log-levels for messages it captures in log files. The main difference between the various log-levels is verbosity; some log-levels include messages from fewer or greater of the other log-levels.
In Nexaweb Platform 4.5+, you can select which log-level messages you want to capture in the logs generated by Nexaweb server or the client.
Note: For earlier versions of Nexaweb Platform, you can select which log-level messages you want to capture in the logs generated by Nexaweb server only. For the logs generated by the Nexaweb client, you can change the log level only to debug log-level messages.
Nexaweb provides the following log-levels for application messages:
Log-Level | Description | Server Logs | Client Logs |
debug | Includes messages from all log -levels. | Configurable | Configurable - All Nexaweb Platform versions |
info | Includes messages from all log-levels except, debug. Default log-level for Nexaweb Server and Client logs. | Configurable | Configurable - Nexaweb Platform 4.5+ Default level when debug is not set - Nexaweb Platform prior to version 4.5+ |
exception | Includes exception and error messages. Exception messages indicate behavior that might affect a current operation. | Configurable | Default log level - Nexaweb Platform 4.5+ Not configurable - Nexaweb Platform prior to version 4.5+ |
error | Includes error messages only. Exception messages indicate behavior from which the application may not be able to recover. | Configurable | Configurable - Nexaweb Platform 4.5+ Not configurable - Nexaweb Platform prior to version 4.5+ |
To configure log-levels for various application message types, see the Configuring Server Debug Logs or Configuring Client Debug Logs sections.
Configuring Debug Logs
You configure debug logs in the Nexaweb Server and Client configuration files.
...
Nexaweb Server と Nexaweb Client では、さまざまなアプリケーション メッセージが生成されます。このようなメッセージは、アプリケーションをデバッグするときに参考にすることができます。また、このようなメッセージのコン テンツを表示するログレベルを指定することもできます。
Nexaweb は、各種のアプリケーション メッセージを Nexaweb コンソールに表示して、Web アプリケーション サーバー上のServletContextログに格納します。
アプリケーション メッセージ
Nexaweb Server と Nexaweb Client は、アプリケーション メッセージのタイプをそれぞれ異なる方法で生成します。Nexaweb Server は、アプリケーションで使用される Nexaweb の機能に基づいて、メッセージ タイプのデフォルトのセットとその他のタイプを生成します。一方、Nexaweb Client は、メッセージ タイプのデフォルトのセットのみを生成します。
メッセージ タイプ | 説明 | サーバーまたはクライアント |
Macrohandler | マクロの定義に関するメッセージ。 | 両方 |
Messaging | アプリケーションの MessageListener クラスによって処理されないメッセージ。 | 両方 |
FormatUtils | Nexaweb の自動タイプ変換に関するメッセージ。 | 両方 |
XUpdate | XUpdate 文の結果を詳述するメッセージ。 | 両方 |
XModify | XModify文の結果を詳述するメッセージ。 | 両方 |
Macro | マクロの実行に関するメッセージ。 | クライアント |
WebServicesBroker | Web サービスに関するメッセージ。 | クライアント |
PrintService | PDF 印刷に関するメッセージ。 | サーバー、デスクトップクライアント |
Nexaweb Server が生成するアプリケーション メッセージのタイプの完全なリストを参照するには、Nexaweb Server 管理コンソールに次のようにアクセスします。
- ブラウザの [Address] または [Location]フィールドに「<application-context>/Nexaweb/Services」と入力するか、実行中の Nexaweb クライアントアプリケーションでF3キーを押します。
Nexaweb Server 管理コンソールのページが表示されます。 - ページの右側にある [Reports] の下の [Log Names]をクリックします。
Nexaweb Server 管理コンソールのページに、現在使用中のログ名がすべて一覧表示されます。
メッセージのログ レベル
Nexaweb では、ログ ファイルでキャプチャされるメッセージに多くの種類のログ レベルが用意されています。ログ レベルの主な違いは冗長性にあります。つまり、あるログレベルには、より少ない、またはより多くの他のログ レベルからのメッセージが含まれています。
Nexaweb Platform 4.5+ では、Nexaweb Server または Nexaweb Client によって生成されるログに、キャプチャするメッセージのログレベルを選択できます。
Nexaweb では、アプリケーション メッセージに次のログ レベルが用意されています。
ログ レベル | 説明 | サーバー ログ | クライアント ログ |
debug | すべてのログ レベルからのメッセージを含みます。 | 構成可能 | すべてのバージョンの Nexaweb Platform で構成可能。 |
info | debug を除くすべてのログ レベルからのメッセージを含みます。 Nexaweb Server および Nexaweb Client ログのデフォルトのログ レベルです。 | 構成可能 | Nexaweb Platform 4.5+ では構成可能。 4.5+ より前のバージョンの Nexaweb Platform では、debug が設定されていない場合のデフォルトのログレベル。 |
exception | 例外とエラー メッセージを含みます。 例外メッセージは、現在の操作に影響を与える可能性のある動作を示します。 | 構成可能 | Nexaweb Platform 4.5+ ではデフォルトのログレベル。 4.5+ より前のバージョンの Nexaweb Platform では構成不可。 |
error | エラー メッセージのみを含みます。 エラー メッセージは、アプリケーションが復旧できない可能性のある動作を示します。 | 構成可能 | Nexaweb Platform 4.5+ では構成可能。 4.5+ より前のバージョンの Nexaweb Platform では構成不可。 |
各種のアプリケーション メッセージでログ レベルを構成するには、「サーバーのデバッグ ログの構成」または「クライアントのデバッグ ログの構成」を参照してください。
デバッグ ログの構成
Nexaweb Server および Nexaweb Client のコンフィギュレーション ファイルでデバッグ ログを構成します。
コンフィギュレーション ファイル | ファイル名 | 場所 |
クライアント | nexaweb-client.xml | application project\WebContent\WEB-INF |
server サーバー | nexaweb-server.xml | Nexaweb Platform 4.x\doc |
Configuring Server Debug Logs
...
サーバーのデバッグ ログの構成
サーバーのコンフィギュレーションファイル、nexaweb-server.xml
...
- Message log-levels
- Message format
- Consumers to which Nexaweb server sends log messages
- Email consumer properties
The following sections describe how to configure various aspects of server log files.
Configuring Message Log-Levels
- Default log-level for all application message types
- Log-levels for individual application message types
- メッセージのログレベル
- メッセージフォーマット
- Nexaweb Server がログメッセージを送信するコンシューマ
- 電子メールコンシューマのプロパティ
メッセージのログ レベルの構成
次のようなメッセージのログレベルは、<log-configuration>セクションで構成します。
- アプリケーションメッセージのすべてのタイプに構成するデフォルトのログレベル
- アプリケーションメッセージの個々のタイプに構成するログレベル
タグ | 説明 |
<default-log-level> |
...
アプリケーション メッセージのすべてのタイプに対してログ ファイルでキャプチャするデフォルトのログ レベルを指定します。 |
<log name log-level> |
...
...
アプリケーション メッセージの特定のタイプに対してキャプチャするログ レベルを指定します。 |
例:
Code Block |
---|
<log-configuration default-log-level="info"> <log name="XUpdate" log-level="debug"/> <log name="SessionManager" log-level="debug"/> </log-configuration> |
Configuring Message Formats
In the <output-format> section, you can configure the format of messages to appear in the consumers you set-up to receive log messages. You can specify the content to appear in messages and the format of dates.
Tag | Description |
<format> | Specifies the format of log messages by specifying the range of content to appear in the message. See following table for list of possible message content. |
<date-format> | Specifies date format, if you selected date as part of the range of content to appear. |
Message Content Options
メッセージ フォーマットの構成
<output-format> セクションでは、ログ メッセージを受信するために設定するコンシューマで表示されるメッセージのフォーマットを構成できます。メッセージに表示されるコンテンツおよび日付のフォーマットを指定することができます。
タグ | 説明 |
<format> | メッセージに表示するコンテンツの範囲を指定することによって、ログ メッセージのフォーマットを指定します。使用可能なメッセージ コンテンツのリストについては、次の表を参照してください。 |
<date-format> | 表示するコンテンツの範囲の一部に日付を選択した場合は、日付フォーマットを指定します。 |
メッセージ コンテンツのオプション
コンテンツ | 説明 | シンボル |
Type | メッセージのログ レベルを含みます。 | {0} |
Formatted date |
...
Nexaweb |
...
がメッセージを生成した日付。 | {1} |
Threadname |
...
メッセージを生成したスレッドの名前を指定します。 | {2} |
Message |
...
発生したイベントに関する情報。 | {3} |
LogName |
...
このイベントがキャプチャされるログ。 | {4} |
You specify the range of content to appear in the log message in a space separated list between straight brackets as follows:次に示すように、各アイテムをスペースで区切り、全体を角かっこで囲んだリストを使用して、ログ メッセージに表示するコンテンツの範囲を指定します。
<format> [{1} {2} {3} {4}] </format>
This example includes the formatted date, threadname, message and logname.
In addition, you can format the message using punctuation that appears between the pieces of content included in the message similar to the following:この例には、フォーマット設定された日付 (Formatted date)、スレッド名 (Threadname)、メッセージ (Message)、およびログ名 (Logname) が含まれています。
また、次に示すように、メッセージに含まれるコンテンツの各部分の間に表示される句点を使用して、メッセージのフォーマットを設定することもできます。
<format> [{1}:{2} {3} {4}] </format> In this example the message appears as follows:
この例では、メッセージは次のように表示されます。
<date-format>
...
Nexaweb Server
...
You can configure the following server log message consumers:
<consumers>セクションでは、Nexaweb Server のログメッセージの送信先であるコンシューマを指定します。このセクションに含める各コンシューマは、ログメッセージに固有のメソッド\受信者を指定します。
コンシューマ | タグ | 説明 |
Web アプリケーションログ | <consumer class="com.nexaweb.server. |
...
log.WebApplicationLogConsumer" /> |
...
このタグをLogging Configurationに含めると、ログメッセージが Web アプリケーションサーバーの ServletContext ログに出力されます。1 つのアプリケーションにつき、1 つの ServletContext ログにのみメッセージを送信するよう構成できます。 | |
コンソールログ | <consumer class="com.nexaweb.server. |
...
log.ConsoleLogConsumer" /> |
...
このタグをLogging Configuration |
...
に含めると、アプリケーションの実行中にログメッセージを Nexaweb Studio コンソールで表示するために、ログメッセージが Nexaweb コンソールログに出力されます。 | |
メール | <consumer class="com.nexaweb.server. |
...
Tag | Description |
<mail-level> </mail-level> | Specifies what level of log messages Nexaweb sends through email. This filters out message levels from the range of levels specified by the <default-log-level> in the <log-configuration> section. Options: |
<properties> </properties> | In this section, you configure properties of the email consumer including To and From addresses, subject content, and message format within body of email. See the following table for descriptions of commonly used <properties> tags. In addition to the email consumer properties listed in the following table, you can use any properties described in the JavaMail API Design Specification or the JavaMail API Documentation available at http://java.sun.com/products/javamail/reference/api/index.html. |
Tag | Description |
<property name="mail.transport.protocol" value=smtp/> | Specifies the default Message Access Protocol. |
<<from-name>Nexaweb Administrator</from-name> | Specifies the name to include in the From portion of outbound emails. |
<from-address>Nexaweb Administrator</from- address> | Specifies the address to include in the From portion of outbound emails. |
<recipient>administrator@companyname.com</recipient> | Specifies a recipient of outbound emails. You can add multiple entries of this tag to send emails to multiple recipients. |
<mail-host>itsupport.companyname.com</mailhost> | Specifies host name or IP address of the mail server. Required. |
<mail-username>admin@companyname</ mail-username> | Username to use for SMTP server, if required. |
mail-password>admin@companyname</ mail- password > | Password to use for SMTP server, if required. |
<mime-type>text/html</mime-type> | Specifies either text/plain or text/html as the mime type of the body of the email. |
<mail-subject-format> output-format </ mail-subject-format> | Specifies what information to appear in the subject line of the email, using the syntax described in the <output-format> section of Configuring Message Format. |
Configuring Client Debug Logs
The client configuration file, nexaweb-client.xml, contains a Client Log Settings section.
In Nexaweb Platform 4.5+, you can configure the following for client logs:
- Message log-levels
- Consumers to which Nexaweb client sends log messages
Configuring Message Log-Levels
In Nexaweb Platform prior to version 4.5+, all client logs capture info level messages by default, which include exception and error messages. In this section you can configure individual logs to capture debug level messages, which include messages from all log-levels.
In Nexaweb Platform 4.5+, you can configure the following in this section:
- Default log-level for all application message types
- Log-levels for individual application message types
Tag | Description |
<default-log-level> | Specifies which log-level to capture for all application message types in log files by default. |
<log name log-level> | Specifies which log-level to capture for the specified application message type. |
...
log.EmailLogConsumer" /> |
...
このタグを含めると、電子メールを介してログメッセージを出力することができます。電子メールを介してログメッセージを送信するだけでなく、Nexawebがこれらのメッセージを送信する宛先の電子メールアドレスとその形式を設定できます。 |
タグ | 説明 |
<default-log-level> | すべてのアプリケーションメッセージのデフォルトログレベルを設定します。 |
<log name log-level> | 指定のアプリケーションメッセージのログレベルを設定します |
例:
Code Block |
---|
<log-configuration default-log-level="info"> <log name="XUpdate" log-level="debug"/> <log name="SessionManager" log-level="debug"/> </log-configuration> |
Configuring Consumers to which Nexaweb Client Sends Log Messages
You can configure the following log message consumers:
...
この例では、すべてのログに対するデフォルトのログレベルを info に設定します。また、ログレベルを debug に設定すると、XUpdate および SessionManager ログに設定されているデフォルトのログレベルがオーバーライドされます。
Nexaweb Client がログメッセージを送信するコンシューマの構成
<consumers> セクションでは、Nexaweb Client のログメッセージの送信先であるコンシューマを指定します。このセクションに含める各コンシューマは、ログメッセージに固有のメソッド\受信者を指定します。
次のサーバーのログ メッセージのコンシューマを構成できます。
コンシューマ | タグ | 説明 |
コンソールログ | <consumer class="com.nexaweb. utilserver.log. ConsoleLogConsumer" /> | Including this tag in the このタグをLogging Configuration of the nexaweb-client.xml file causes Nexaweb to output all client log messages to the Nexaweb console log for display in the Nexaweb Studio console while running an application..Dialog logに含めると、アプリケーションの実行中にログメッセージを Nexaweb Studio コンソールで表示するために、ログメッセージが Nexaweb コンソールログに出力されます。 |
ダイアログログ | <consumer class="com.nexaweb.client.log. DialogLogConsumer" /> | Including this tag in the Logging Configuration of the この tag を nexaweb-client.xml file causes Nexaweb to output client error/exception messages to a modal dialog.file の Logging Configuration に含めることにより Nexaweb がモーダルダイアログがクライアントエラー/例外メッセージを出力する原因になります。 |