Feelin’ the Love From Your Logs

I recently had some datasource issues that I was able to figure out with a bit more feedback from the JRun logs.

First, for those of you who are not system admins, make sure you make a copy of the files before you modify them.

Now, there are a couple of XML files that you can modify that will provide a lot more detail of what is going on.

The CF datasources are stored in the jrun-resources.xml file located in {CFMX install}runtimeserversdefaultSERVER-INF. Locate the datasource in question and change the debugging node (<debugging>false</debugging>) of that element from false to true. This will tell JRun to log more information about this resource. Note: there a lot of other options available several of which you can equate to datasource options in the CF Admin.

Next, we want to modify the the actual logging service. You can do this with the jrun.xml file located in the same directory as jrun-resources.xml above.
Find the LoggerService in the jrun.xml file. Set the following two entries to “true”:
<attribute name=”debugEnabled”>false</attribute>
<attribute name=”metricsEnabled”>false</attribute>

A few lines down from these entries, you can separate the logs into separate files by making the following change:

<attribute name="filename">{jrun.rootdir}/logs/{jrun.server.name}-event.log</attribute>


<attribute name="filename">{jrun.rootdir}/logs/{jrun.server.name}-{log.level}</attribute>

By changing “event.log” to “{log.level}” it will create separate log files for each type of event. This allows you to narrow in on suspected problems a bit easier.

Finally, the logs produced can be found in {CFMX install}runtimelogs. Note: You will want to reverse these changes because they do cause a bit of overhead on the server.

About Rob Rusher

In his role as Principal Consultant for On3, Rob leads an software development practice to help his clients build rich Internet applications for the desktop, browser, and mobile devices, and to rapidly increase their knowledge and skills to better support their organization's goals. Rob is an Adobe Certified Expert, Community Professional, and Certified Instructor. He has taught and mentored the technical teams at HP, Overstock, Paychex, SAS, the FedEx, and other Government and Fortune 100 organizations. Rob has co-authored four best-selling books on building secure, cutting-edge and rapidly developed applications using Adobe AIR, ColdFusion and Flex. He is very active in organizing and speaking at RIA, Adobe LiveCycle, mobile conferences, and user groups. In addition to growing his software consulting practice, On3, Rob has been building expertise in rich client application development on a wider variety of devices and platforms that extend the applications to change the way we all create and live.