Configure Log Rotation for ColdFusion -out Logs

This article describes how to set log rotation size and max number of logs to keep for the CF -out logs which are not rotated through the ColdFusion Administrator.

By default the wrapper for ColdFusion Application Server will keep 200 ColdFusion -out logs at 200k per file. This value can be adjusted by adding the following registry keys using the commands below.

Maximum file size (KB) - "When a file reaches this size, it is automatically archived."

Maximum number of archives - "After reaching this limit, files are deleted in order of oldest to newest."

In my examples I am setting ColdFusion to only save 10 -out files at 1024K (1Mb) each; adjust these values to meet your needs.

ColdFusion 7

REG ADD "HKLM\System\CurrentControlSet\Services\ColdFusion MX 7 Application Server" /v LogFileRotationLimit /t REG_DWORD /d 10 /f

REG ADD "HKLM\System\CurrentControlSet\Services\ColdFusion MX 7 Application Server" /v LogFileSize /t REG_DWORD /d 1024 /f

ColdFusion 8

REG ADD "HKLM\System\CurrentControlSet\Services\ColdFusion 8 Application Server" /v LogFileRotationLimit /t REG_DWORD /d 10 /f

REG ADD "HKLM\System\CurrentControlSet\Services\ColdFusion 8 Application Server" /v LogFileSize /t REG_DWORD /d 1024 /f

ColdFusion 9

REG ADD "HKLM\System\CurrentControlSet\Services\ColdFusion 9 Application Server" /v LogFileRotationLimit /t REG_DWORD /d 10 /f

REG ADD "HKLM\System\CurrentControlSet\Services\ColdFusion 9 Application Server" /v LogFileSize /t REG_DWORD /d 1024 /f