uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

3.3.6 Settings for Acquiring the J2EE Server Log

This subsection describes the items that you can set up for acquiring J2EE server logs.

You can change the log output destination, log size, the log level, the switching method of the log output destination files, and the switching time of the log output destination files for the J2EE server logs. The following table describes the items that you can change and the corresponding parameters of the Easy Setup definition file.

Table 3-11 Settings for acquiring J2EE server log

Items Corresponding parameter of the Easy Setup definition file
Log output destination ejb.server.log.directory in the <configuration> tag on a logical J2EE server (j2ee-server)
Log size

Number of log files
ejbserver.logger.channels.define.channel-name.filenum in the <configuration> tag on a logical J2EE server (j2ee-server)

Maximum size for each log file
ejbserver.logger.channels.define.channel-name.filesize in the <configuration> tag on a logical J2EE server (j2ee-server)
Log level ejbserver.logger.enabled.* in the <configuration> tag on a logical J2EE server (j2ee-server)
Switching method of the log output destination files ejbserver.logger.rotationStyle in the <configuration> tag of the logical J2EE server (j2ee-server)
Switching time of the log output destination files ejbserver.logger.rotationTime in the <configuration> tag of the logical J2EE server (j2ee-server)

If you specify true (default value) in the ejbserver.logger.systemlog.enabled parameter in the <configuration> tag of logical J2EE server (j2ee-server) or if the specification of this parameter is omitted, the message indicating startup, termination, and abnormal termination of the J2EE server will output to an event log (in UNIX, syslog).

Notes (in UNIX)
To output messages related to J2EE server start, stop, and abnormal termination, to syslog, it is necessary to set the priority for the facility daemon to info or debug in the syslog settings. Moreover, the log output destination and log file name of syslog depend on the settings of syslog.
For details about the syslog and its settings, see the description on syslogd or syslog.conf in the manual provided with OS.

For details about the Easy Setup definition file and parameters, see 4.6 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.

Organization of this subsection
(1) Changing log output destination
(2) Change log size
(3) Changing the log level

(1) Changing log output destination

Specify the log output destination directory in the Easy Setup definition file to change the output destination of the J2EE server log.

Changing log output destination
The default log output destination is as follows:
  • In Windows
    working-directory\ejb\server-name\logs
  • In UNIX
    working-directory/ejb/server-name/logs
Note that the default directory path of the working directory is Cosminexus-installation-directory\CC\server\public (in Windows) or /opt/Cosminexus/CC/server/public (in UNIX).
You can change the output destination of the working directory and J2EE server log if you specify following parameters in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file:
  • ejb.public.directory
    Specify the path of the working directory of the J2EE server.
  • ejb.server.log.directory
    Specify the output destination directory of the J2EE server log.
Setup example (For definition of the physical tier)
  • In Windows
     
    <configuration>
     <logical-server-type>j2ee-server</logical-server-type>
     <param>
      <param-name>ejb.server.log.directory</param-name>
      <param-value>C:\CClogs\server\MyServer</param-value>
     </param>
     :
    </configuration>
     
  • In UNIX
     
    <configuration>
     <logical-server-type>j2ee-server</logical-server-type>
     <param>
      <param-name>ejb.server.log.directory</param-name>
      <param-value>/CClogs/server/MyServer</param-value>
     </param>
     :
    </configuration>
     
Current directory
The following is the current directory where the log output destination is specified by a relative path:
  • In Windows
    working-directory\ejb\server-name
  • In UNIX
    working-directory/ejb/server-name

Notes
  • After changing the log output destination, create a log output destination directory before starting the J2EE server.
    If there is no log output destination directory after the change, the message KDJE40024-E will output and an abnormal termination will occur when starting the J2EE server. Moreover, the messages KDJE37209-E, KDJE37210-E, and KDJE37211-E will output and an abnormal termination will occur when executing the Management Server.
  • For starting multiple J2EE servers on the same host, keep the directory name unique for each server including the server name in the directory, so that the log output destination does not have the same directory. When specifying the same directory for a parameter value, the operation is not guaranteed.
  • After changing the log output destination, if you want to output the log to a directory other than the working directory, you cannot delete the log file if the server is not set up. If you want to delete the log file, delete it manually.
  • Note that if you set up the JavaVM maintenance information and the output destination of the garbage collection log in the JavaVM startup parameter, the settings of JavaVM startup parameter are given priority, even when the log output destination is set up in the Easy Setup definition file.
    A JavaVM startup parameter is defined in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. The specified contents of the JavaVM startup parameter are as follows:
<param-name> tag
add.jvm.arg
<param-value> tag
XX:HitachiJavaLog:<JavaVM-Maintenance-information and garbage-collection-log-output-destination>
When you specify the JavaVM startup parameter, the JavaVM maintenance information and the log file of garbage collection is output to the directory set up for the JavaVM maintenance information and for the output destination of garbage collection log respectively.
  • You cannot specify the path including UNC name in the log output destination.

(2) Change log size

Set up the number of log files and the maximum size for each log file in the Easy Setup definition file to change the log size of the J2EE server.

Changing the number of log files
Specify the number of J2EE server log files in the ejbserver.logger.channels.define.channel-name.filenum parameter in the <configuration> tag of the logical J2EE server (j2ee-server).
Setup example (For definition of the physical tier)
 
<configuration>
 <logical-server-type>j2ee-server</logical-server-type>
 <param>
  <param-name>ejbserver.logger.channels.define.MessageLogFile.filenum</param-name>
  <param-value>3</param-value>
 </param>
 ...
</configuration>
 

Changing the maximum file size for each log file
Specify the maximum file size (unit: bytes) for each file of the J2EE server log files in the ejbserver.logger.channels.define.channel-name.filesize parameter in the <configuration> tag of the logical J2EE server (j2ee-server).
Setup example (For definition of physical tier)
 
<configuration>
 <logical-server-type>j2ee-server</logical-server-type>
 <param>
  <param-name>ejbserver.logger.channels.define.MessageLogFile.filesize</param-name>
  <param-value>2097152</param-value>
 </param>
 ...
</configuration>
 

(3) Changing the log level

A J2EE server log level indicates the importance of a log. In log levels, there are four levels; Error, Warning, Information, and Debug. If you set up a log level, the log of the level that is set up will be output. By default, you can acquire only an Error level log and use this log as it is.

Specify the log level in the ejbserver.logger.enabled.* parameter in the <configuration> tag of the logical J2EE server in the Easy Setup definition file. Set up the level names Error, Warning, Information, and Debug as one or in multiple character strings in the <param-value> tag of ejbserver.logger.enabled.*. When you set up multiple log levels, the character string of the level name will be demarcated using comma (,).

Setup example (For definition of the physical tier)
1.
 
<configuration>
 <logical-server-type>j2ee-server</logical-server-type>
 <param>
  <param-name>ejbserver.logger.enabled.*</param-name>
  <param-value>Error</param-value>
 </param>
 ...
</configuration>
 
2.
 
<configuration>
 <logical-server-type>j2ee-server</logical-server-type>
 <param>
  <param-name>ejbserver.logger.enabled.*</param-name>
  <param-value>Error,Warning</param-value>
 </param>
 ...
</configuration>
 
3.
 
<configuration>
 <logical-server-type>j2ee-server</logical-server-type>
 <param>
  <param-name>ejbserver.logger.enabled.*</param-name>
  <param-value>Error,Warning,Information</param-value>
 </param>
 ...
</configuration>
 
4.
 
<configuration>
 <logical-server-type>j2ee-server</logical-server-type>
 <param>
  <param-name>ejbserver.logger.enabled.*</param-name>
  <param-value>Error,Warning,Information,Debug</param-value>
 </param>
 ...
</configuration>
 

Notes
  • The number of logs that you can acquire increases in the order of 1, 2, 3, 4 as described in examples. If you acquire the log after setting up multiple log levels, the performance will decrease and the switching of log file will occur frequently.
  • If you set up a blank value or a character string other than Error, Warning, Information, and Debug for the level name, the message KDJE90009-W will output and the Error level log will be acquired.

Hitachi recommended settings for log level
Hitachi recommends following settings for a log level:
  • For normal operation
    Specify Error in the level name.
  • For normal operation (verbose)
    Specify Error, Warning in the level name to acquire more detailed information than that of the normal operation.
  • For test
    Specify Error, Warning, Information in the level name.
  • At failure detection time
    Specify Failure, Warning, Information, Debug in the level name.