Archive for January, 2011

This applies to CF 7, 8, and 9. The log settings in CF Admin only affect the standard logs such as the exception and application logs. To tweak the log rotation settings for the CF -out logs follow the steps listed below.

Logfile size:

1. First locate jrunsvc.exe typically in the CFroot\bin or CFroot\runtime\bin folder.

2. Open up a command prompt and change to this directory:
cd C:\Coldfusion8\runtime\bin

3. Run the following -logfilesize command making sure to update the values in [] accordingly:
jrunsvc.exe -logfilesize [filesize] [service_name]


jrunsvc.exe -logfilesize 1024 “ColdFusion 8 Application Server”

The command above will set the logfilesize to 1mb. Once the file reaches this size CF will create a new one.

Logfile rotation limit:

By default CF creates 200 of thes -out log files before deleting old ones. There is also a bug with the -logfileRotationLimit switch because it requires a value over 1000. So to set this you will need to make a registry change but first I recommend setting it to 1001 to allow CF to create the necessary registry key.

1. As in the example above, open a command prompt and change to the directory where jrunsvc.exe is located.

2. Issue the following command. Note you may have to change the name of the CF instance between quotes to match your setup:

jrunsvc.exe -logfileRotationLimit 1001 “ColdFusion 8 Application Server”

3. Open the registry editor by clicking Start -> Run -> regedit

4. Navigate to the following key. Note the ColdFusion path at the end will be different depending on your version:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ColdFusion 8 Application Server

5. Double click the “LogFileRotationLimit” key and change the value from 1001 to the desired number of files to keep.

The bug mentioned above will throw this error if you try to set the value to something under 1000:
jrunsvc.exe -logfileRotationLimit 50 “ColdFusion 8 Application Server”
Error: log file rotaion limit must be at least 1000