The Application Server uses the Java 2 platform Logging API specified in JSR 047. Application Server logging messages are recorded in the server log, normally found at domain-dir/logs/server.log.
The domain-dir/logs directory contains two other kinds of logs in addition to the server log. In the access subdirectory are the HTTP Service access logs, and in the tx subdirectory are the Transaction Service logs. For information about these logs, consult the Administration Console online help.
The components of the Application Server generate logging output. Application components can also generate logging output.
Application components may use the Apache Commons Logging Library to log messages. The platform standard JSR 047 API, however, is recommended for better log configuration.
Log records follow a uniform format:
[#|yyyy-mm-ddThh:mm:ss.SSS-Z|Log Level|ProductName-Version|LoggerName|Key Value Pairs|Message|#]
[#|2004-10-21T13:25:53.852-0400|INFO|sun-appserver-e8.1|javax.enterprise. system.core|_ThreadID=13;|CORE5004: Resource Deployed: [cr:jms/DurableConnectionFactory].|#]
In this example,
[# and #] mark the beginning and end of the record.
The vertical bar (|) separates the record fields.
2004-10-21T13:25:53.852-0400 specifies the date and time.
The Log Level is INFO. This level may have any of the following values: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST.
The ProductName-Version is sun-appserver-ee8.1.
The LoggerName is a hierarchical logger namespace that identifies the source of the log module, in this case javax.enterprise.system.core.
The Key Value Pairs are key names and values, typically a thread ID such as _ThreadID=14;.
The Message is the text of the log message. For all Application Server SEVERE and WARNING messages and many INFO messages, it begins with a message ID that consists of a module code and a numerical value (in this case, CORE5004).
You can use the com.sun.enterprise.server.logging.max_history_files system property to limit the number of rotated log files for both access logging and the server log. The property specifies the maximum number of access log files to keep, starting with the most recent ones.
If the property is not set, then no history files cleanup is done.
If the property is set and it's either an invalid number or null, then a default of 10 history files is kept.
If the property is set to 0, then no history files are kept.
In the Admin Console, access the config/server that this system property needs to be set for. On the command line, use the create-jvm-option command.