You can modify logging behavior by setting properties in the logging.properties file as follows:
In a text editor, find the property that you want to modify and make your changes.
The following properties are available:
Contains the name and location of the log file. By default, the name is server.log and the location is the logs directory. These can be changed.
com.sun.enterprise.server.logging.FileandSyslogHandler.file=logs/server.log
Rotates the log file based on time in minutes. If defined, time limit takes precedence over size limit. If set to 0 (the default), there is no rotation based on time.
com.sun.enterprise.server.logging.FileandSyslogHandler.rotationTimelimitInMinutes=0
Rotates the log file based on limit in bytes. If set to 0 (the default), there is no rotation based on file size. 500000 is the minimum.
com.sun.enterprise.server.logging.FileandSyslogHandler.rotationLimitInBytes=0
Uses UniformLogFormatter to format the records in the log file.
com.sun.enterprise.server.logging.FileandSyslogHandler.formatter=com. sun.enterprise.server.logging.UniformLogFormatter
Save the file.
To apply your changes, restart Enterprise Server.
Stop Enterprise Server.
For instructions, see To Stop a Domain (or Server).
Start Enterprise Server.
For instructions, see To Start a Domain (or Server).
The following example changes the rotationTimelimitInMinutes from 0 (the default) to 90 minutes:
Before:
com.sun.enterprise.server.logging.FileandSyslogHandler.rotationTimelimitInMinutes=0 |
After: :
com.sun.enterprise.server.logging.FileandSyslogHandler.rotationTimelimitInMinutes=90 |