Skip to main content
May 17, 2010
Answered

JRun coldfusion-out.log file rotation

  • May 17, 2010
  • 3 replies
  • 1489 views

I'm running CF 8.01 and have noticed that JRun is using a rotation of 200 files for the coldfusion-out.log file. Although the file sizes are only 200K, I'd like to cut that rotation number down to 20 files or so. After a lot of Googling, I'm unable to find where to change this setting. I would have expected it would be somewhere in jrun.xml, but I certainly didn't see it in there. Does anyone know where to change it?

    This topic has been closed for replies.
    Correct answer Jochem van Dieten

    rchinoy wrote on 5/18/2010 2:49 PM:

    Thanks, Jochem. That certainly looks like the right place to change it. Will the new setting get stored somewhere, or will it get lost when the server is restarted?

    If this is Windows it will be stored in

    HKLM\Software\CurrentControlSet\Services\servicename\

    3 replies

    Inspiring
    May 18, 2010

    jrun.xml affects JRun while logfile rotation is a feature of the service wrapper (which basically redirects stderr and stdout to logfiles). Check the helpfile of your service wrapper for instructions, i.e. if you run CF on top of JRun on Windows run the command "jrunsvc.exe /?".

    May 18, 2010

    Thanks, Jochem. That certainly looks like the right place to change it. Will the new setting get stored somewhere, or will it get lost when the server is restarted?

    Jochem van DietenCorrect answer
    Inspiring
    May 18, 2010

    rchinoy wrote on 5/18/2010 2:49 PM:

    Thanks, Jochem. That certainly looks like the right place to change it. Will the new setting get stored somewhere, or will it get lost when the server is restarted?

    If this is Windows it will be stored in

    HKLM\Software\CurrentControlSet\Services\servicename\

    May 18, 2010

    vague recollection that the -out file does not obey these settings, anyhow, go to jrun.xml search for rotationSize and change to say 1M and rotationfiles to 3, but you also need to change the filename to {jrun.rootdir}/logs/{jrun.server.name}-event-{log.level}.log - but am sure it still does get rid of them, only splits the output for you, only other thing is to set the deleteOnExist to true (bit stupid as you'll loose any valuable information in a crash) . Only real way is to write a task to do it.

    ilssac
    Inspiring
    May 17, 2010

    Well, I can't help you with what xml file stored this data.

    But I just use the ColdFusion Administrator -> Debugging & Logging -> Logging Settings form page.  Where you can set the Maximum file size (KB) and Maximum number of archives settings.