Using Java logging in an application

This topic describes how to use Java™ logging within an application.

About this task

To create an application using Java logging, perform the following steps:

Procedure

  1. Optional: Create the necessary handler, formatter, and filter classes if you need your own log files.
    Note: Use the WebSphere® log and trace infrastructure to make problem source identification simpler, rather than creating separate log files.
  2. Optional: If localized messages are used by the application, create a resource bundle, as described in Creating log resource bundles and message files.
  3. In the application code, get a reference to a logger instance, as described in Using a logger.
  4. Insert the appropriate message and trace logging statements in the application, as described in Using a logger.

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:17
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=ttrb_javalogapps
檔名:ttrb_javalogapps.html