Hitachi

uCosminexus Application Server Expansion Guide


8.6 Creating and setting loggers and handlers

To output a user log by using the Java logging APIs, you create loggers and handlers, and specify the required settings. You specify the parameters such as the application-distinguished name (AppName) and the message ID (MsgID), required for the log output, in arguments of the create method in the CJLogRecord class provided with Cosminexus. You can also create your own class to customize the log filtering and format of output contents.

Note that for a user log output, you are required to specify the properties such as the output destination of logs and number of configuration files in the execution environment. For details on user log settings in the execution environment, see 8.8 Setting the user log output of J2EE applications or 8.9 Setting the user log output of batch applications.

This section gives an overview of creating and setting loggers and handlers used for the user log output of J2EE applications or batch applications.

For details on the user log output of EJB client applications, see 8.10 Setting the user log output of EJB client applications (When using the cjclstartap command) or 8.11 Implementing and setting the user log output of EJB client applications (When using the vbj command).

Organization of this section