Usando a Criação de Logs do Java em um Aplicativo
Este tópico descreve como usar a criação de log do Java™ em um aplicativo.
Sobre Esta Tarefa
Para criar um aplicativo usando a criação de log do Java, execute as seguintes etapas:
Procedimento
- Opcional: Crie o manipulador, o formatador e as classes de filtro necessárias se tiver que criar seus próprios arquivos de log. Nota: Use a infraestrutura de log e rastreio do WebSphere para simplificar a identificação da origem dos problemas, em vez de criar arquivos de log separados.
- Opcional: Se as mensagens localizadas forem usadas pelo aplicativo, crie um pacote configurável de recursos, conforme descrito em Creating log resource bundles and message files.
- No código do aplicativo, obtenha uma referência para uma instância do criador de logs, conforme descrito em Using a logger.
- Insira as instruções de mensagem e de criação de logs de rastreio adequadas no aplicativo, conforme descrito em Using a logger.
Subtópicos
Using a logger
You can use Java logging to log messages and add tracing.Java logging
Java logging is the logging toolkit that is provided by the java.util.logging package. Java logging provides a standard logging API for your applications.Configuring the logger hierarchy
WebSphere Application Server handlers are attached to the Java root logger, which is at the top of the logger hierarchy. As a result, any request from anywhere in the logger tree can be processed by WebSphere Application Server handlers.Creating log resource bundles and message files
You can forward messages that are written to the internal WebSphere Application Server logs to other processes for display. Messages that are displayed on the administrative console, which can be running in a different location than the server process, can be localized using the late binding process. Late binding means that WebSphere Application Server does not localize messages when they are logged, but defers localization to the process that displays the message.Logger.properties file for configuring logger settings
Use the Logger.properties file to set logger attributes for specific loggers.


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=ttrb_javalogapps
Nome do arquivo: ttrb_javalogapps.html