To handle the growth of the
logs/wrapper.log file, you can either:
- Delete the file when your tc Server instance is restarted.
- Enable rotation of the file.
Deleting the File
You can manually delete the logs/wrapper.log file when the server is brought down for other maintenance jobs or can automate the deletion.
To automate the deletion of the logs/wrapper.log file:
- Open the conf/wrapper.conf file using a text editor.
- Locate the section titled Wrapper Logging Properties.
- In that section, add this entry:
wrapper.logfile.rollmode. = WRAPPER
- Locate the property wrapper.logfile.maxfiles.
- Set the value of this property to 1.
-
Restart your tc Server instance.
After you make these changes, the wrapper automatically starts with a fresh log file whenever the Windows service is restarted .
Rotating the File
You can rotate the log file either by size or by date.
To rotate the wrapper.log file by date:
- Open the conf/wrapper.conf file using a text editor.
- Locate the section titled Wrapper Logging Properties.
- In that section, add this entry:
wrapper.logfile.rollmode = DATE
- Locate the wrapper.logfile property.
- Set its value to %CATALINA_BASE%\logs\wrapper-YYYYMMDD.log.
- Restart your tc Server instance
To rotate the wrapper.log file by size:
- Open the conf/wrapper.conf file using a text editor.
- Locate the section titled Wrapper Logging Properties.
- Set the value of the wrapper.logfile.maxsize property to the size at which the log file should rotate. For example:
wrapper.logfile.maxsize = 10m
This sets the wrapper to roll the log when it reaches a 10MB size.
Note: When specifying size for the wrapper.logfile.maxsize property, use the abbreviation M for MB and K for KB.
- Restart your tc Server instance.
Note :When rotating by size, you need not add the wrapper.logfile.rollmode property because the default value for this property is to rotate by size.