8.8.1 J2EE server settings
Edit an Easy Setup definition file and specify the log output destination, log levels, number of log files, filters and formatters to be used, from the handler.
- Organization of this subsection
(1) Setting contents
In the Easy Setup definition file, you specify the settings in the <configuration> tag of a logical J2EE server (j2ee-server), to output the user logs of a J2EE application, with the parameters starting with ejbserver.application. The parameters starting with ejbserver.application are given below. In handler-name, specify the handler name used to distinguish key values. In logger-name, specify the logger name, which is specified when acquiring Logger instances.
-
ejbserver.application.userlog.CJLogHandler.handler-name.appname
For every handler, specify a default value for the J2EE application name (value of the AppName field) in the message output to a log file.
-
ejbserver.application.userlog.CJLogHandler.handler-name.count
For every handler, you specify number of log files.
-
ejbserver.application.userlog.CJLogHandler.handler-name.encoding
For every handler, you specify the encoding of the character string output to a log file.
-
ejbserver.application.userlog.CJLogHandler.handler-name.filter
For every handler, you specify the filter name to be used.
-
ejbserver.application.userlog.CJLogHandler.handler-name.formatter
For every handler, you specify the formatter name to be used.
-
ejbserver.application.userlog.CJLogHandler.handler-name.level
For every handler, you specify an upper limit of the log acquisition level.
-
ejbserver.application.userlog.CJLogHandler.handler-name.limit
For every handler, you specify the size of the log file.
-
ejbserver.application.userlog.CJLogHandler.handler-name.msgid
For every handler, specify the default value of a message ID (value of the MsgID field) of the message output in a log file.
-
ejbserver.application.userlog.CJLogHandler.handler-name.path
For every handler, you specify the output destination and the prefix of a log file. The output log file name is Prefix 1-through-16-number.log. Specify this key without fail.
-
ejbserver.application.userlog.CJLogHandler.handler-name.separator
For every handler, you specify the default value of the element separating character used to output the log file messages in one sentence.
-
ejbserver.application.userlog.loggers
Declares the logger name to be used. Specify this key without fail.
-
ejbserver.application.userlog.Logger.logger-name.handlers
For every logger, you specify the handler name to be used. Specify this key without fail.
-
ejbserver.application.userlog.Logger.logger-name.level
For every logger, you specify the log acquisition level of the logger.
-
ejbserver.application.userlog.Logger.logger-name.useParentHandlers
For every logger, you specify whether the log record of the level, which passes through the logger, is to be propagated to the handler used by the parent logger.
-
ejbserver.application.userlog.Logger.logger-name.filter
For every logger, you specify the filter used for choosing a message in the logger.
You must specify at least the following three parameters to output the user logs of J2EE applications:
-
ejbserver.application.userlog.CJLogHandler.handler-name.path
-
ejbserver.application.userlog.loggers
-
ejbserver.application.userlog.Logger.logger-name.handlers
For details on the Easy Setup definition file, see 4.3 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
(2) Notes
-
You can connect multiple handlers to a logger. However, you cannot connect a file handler (CJMessageFileHandler) with the same Path settings to multiple loggers. A file handler performs instantiation by referring to the specification of connection to a logger (value of ejbserver.application.userlog.Logger.<logger name>.handlers). In such cases, if a handler having the same prefix (value of ejbserver.application.userlog.CJLogHandler.handler-name.path) as the log output destination is instantiated, opening of the log file fails.
-
You can specify the settings and setup of the handler and the logger in the Easy Setup definition file. However, when you directly create a handler or change the configuration of a logger in a J2EE application, you must have the security permission of LoggingPermission("control") for the application to be executed. For details on how to set up the security permissions of LoggingPermission("control"), see 8.8.2 Setting security policy.