WebFacing アプリケーションは、WebSphere® Application Server Common Base Event ロギングを使用してランタイム・アプリケーションの問題を診断します。 WebFacing アプリケーションをアプリケーション・サーバーで実行すると、デフォルトで アプリケーション・サーバーのコンソールにロギング情報が送信されます。 WebSphere Application Server での ロギングおよびトレースについて詳しくは、ご使用の レベルの WebSphere Application Server 向けの インフォメーション・センター (例えば http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/com.ibm.websphere.nd.multiplatform.doc/info/ae/ae/ttrb_addtrace.html) を 参照してください。
WebSphere Application Server の管理コンソールを使用して、WebFacing アプリケーション・ロガー (com.ibm.etools.iseries.webfacing.context_root_name) のロギング・レベルを構成できます。 ロガーの構成について詳しくは、ご使用のレベルの WebSphere Application Server 向けのインフォメーション・センターを参照し、『管理コンソールを使用したロギング・プロパティーの構成』を検索してください。
さらに、webfacinglogging.properties 構成ファイルを使用することで、 ロガーの詳細レベルと、WebFacing アプリケーション・ロガーの各種設定も構成できます。
デフォルトでは、WebSphere Application Server のログ・メッセージはアプリケーション・サーバーのコンソールに書き込まれ、ログ・レコードは WebSphere Application Server の activity.log ファイルに書き込まれます。 アプリケーション・サーバーの管理コンソールからトレースをオンにした場合、 トレース情報はアプリケーション・サーバー・インスタンスの trace.log ファイルに書き込まれます。 トレースが有効であるときに、すべてのログ・メッセージは単純テキスト形式で trace.log に記録され、 ログ・レベル CONFIG 以上のすべてのログ・レコードも 共通ベース・イベント形式で activity.log に記録されます。WebSphere Application Server でのトレースの有効化について詳しくは、ご使用のレベルの WebSphere Application Server 向けのインフォメーション・センターを参照し、『サーバー始動時にトレースを使用可能にする』を検索してください。
また、ランタイム・ロギングおよびトレース情報を、ご使用のアプリケーション・サーバーが稼働しているシステム内で個別のファイルに分けるように、 WebFacing アプリケーションの設定値を構成できます。ログ・レベルが CONFIG 以上の場合、 このロガーのトレースが有効であれば、ログ・レコードはログ・ファイルとトレース・ファイルに書き込まれます。 ログ・レベルが CONFIG よりも低い場合、トレース・レコードはトレース・ファイルに書き込まれます。 この機能を有効にするためのプロパティーについては、 下記のWebFacing アプリケーションの構成設定セクションを参照してください。
ログおよびトレース・ファイルは、 HTTP セッション別に編成されます。ログ・ファイルの名前は sessionid.log です。 sessionid は、WebFacing アプリケーションにアクセスするブラウザーのセッション ID です。 同様に、トレース・ファイル名は sessionid.trace になります。WebFacing アプリケーションに関連するログ・ファイルは、 WebFacing アプリケーションを含む Web プロジェクトのコンテキスト・ルート名と同じ名前のディレクトリーに書き込まれます。 ユーザーの WebFacing ログおよびトレース・ファイルの場所の構成については、 以下のWebFacing アプリケーションの構成設定セクションにある logFileLocation プロパティーを参照してください。
ログ・レコードのメッセージ・テキストを参照するだけでよい場合は、書き込むログ・レコードを単純なストリングとしてフォーマットするように設定値を構成できます。 共通ベース・イベント・ログ・レコードの形式の制御については、 以下のWebFacing アプリケーションの構成設定セクションにある useXMLFormatForCBELogging プロパティーを参照してください。
WebFacing アプリケーションのロギングおよびトレース設定値は、 webfacinglogging.properties ファイルによって構成できます。このファイルは、WebFacing Web プロジェクトの WebContent/WEB-INF/classes にあります。 以下に、このファイル内の設定値を示します。
# Control the level of runtime logging # The levels in descending order are: # SEVERE (highest value) # WARNING # INFO # CONFIG # FINE # FINER # FINEST (lowest value) # In addition, there is a level OFF that can be used to turn off logging, # and a level ALL that can be used to enable logging/tracing of all messages. # See the Java document for the java.util.logging class for more information. # The levels above or equal to CONFIG are considered logging. # The levels below CONFIG are considered tracing. # Default is SEVERE. com.ibm.etools.iseries.webfacing.level=SEVERE # Control if the logging level set in this file will override # the static configuration settings of log detail levels in WAS # Valid values are: # true - default # false com.ibm.etools.iseries.webfacing.overrideAdminLevelSetting=true # Control which directory the log and trace files will be written to. # A subdirectory with the same name as the web-app will be created # to store all the log and trace files of a specific web application. # This value will be used when property "logToFile" is set to true. # "%WASTraceDir" - trace directory of the WAS server instance. # By default, it is the SERVER_LOG_ROOT variable defined. # in the WAS server. This value will be used as default value # if the web application is running in a WAS environment. # If this value is not available, "%h/iserieslogs" will be used as # default. # "%h" - the value of the "user.home" system property # "%h/iserieslogs" will be used as default value # "%t" - the value of the system temporary directory # "." - the value of the WEB-INF directory # "/" the local pathname separator # # Example for workstation full path: # "c:¥¥my_directory¥¥my_log_dir" # Please notice that double backslash is needed here. # # Example for iSeries IFS full path # "/home/my_id/my_log_dir" com.ibm.etools.iseries.webfacing.logFileLocation=%WASTraceDir # Control if log and trace information will be written to files. # Valid values are: # true # false - default -- In this case the information is written to the console. com.ibm.etools.iseries.webfacing.logToFile=false # Control if parent's output handler of this logger will also be used. # If this property is set to false, the log or tracing information will # not be written to the WAS activity.log or trace.log # Valid values are: # true - default # false com.ibm.etools.iseries.webfacing.useParentHandler=true # Control the format of the Java log records written to a file. # If this property is set to true, the log records written to the # log file will be in XML format. # See the Java documentation for the java.util.logging.XMLFormatter class # for more information. # If this property is set to false, the log records written to the # log file will be in simple string format. # Valid values are: # true - default # false com.ibm.etools.iseries.webfacing.useXMLFormatForJSR47Logging=true # Control the format in which Common Base Event log records are written to a file. # If this property is set to true, the log records written to the # log file will be in Common Base Event # XML format. # If this property is set to false, the log records written to the log # file will be in simple string format. # Valid values are: # true - default # false com.ibm.etools.iseries.webfacing.useXMLFormatForCBELogging=true #Control how many log files will be created for each web application # before the oldest log file is deleted. com.ibm.etools.iseries.maxlog=3