views:

95

answers:

1

I am running ColdFusion 8 application servers on Windows machines. ColdFusion is running as a Windows service.

I have noticed that System.out file is massive (1GB+) on some of the machines.

e.g.

C:\ColdFusion8\runtime\bin\System.out

I understand this is where console output ends up when running CF as a service, but is there any JRun setting to allow me to save this file off every x MB, or to limit the size of the file or something similar?

All tips appreciated!

+7  A: 

It looks like if you go to the jrun.xml for your ColdFusion server file and find the line:

<service class="jrunx.logger.ConsoleLogEventHandler" name=":service=ConsoleLogEventHandler" />

You should be able to add these bits to it:

    <attribute name="rotationSize">200k</attribute>
    <attribute name="rotationFiles">3</attribute>
    <!-- Use heading to specify an alternate log heading for system event log. -->
    <!-- EXAMPLE: <attribute name="heading"># Created by JRun on {date MM/dd HH:mm:ss}</attribute> -->
    <attribute name="closeDelay">5000</attribute>
    <attribute name="deleteOnExit">false</attribute>

And then manipulate the settings as you see fit. However according to this blog entry, you cannot change the name of the file.

Terry Ryan
There is actually one <service /> XML node in there already for the Coldfusion log files, and you can add another <service /> node with a unique name and point it at {jrun.rootdir}/bin/System.out to sort out that file - works a charm!
Ciaran Archer