Generating Daily Clarity Logs

Back To Blog

I recently came across the following entry on the IBM / Clarity Support site and I thought I would pass it on.

By default Clarity stores all log entries into 2 files (found in \Clarity Systems\ClarityServer\Logs) that continue to grow until you delete them.  These can quickly become too large to be useful and can also be difficult to remove as you may want to keep only some history (for example 30 days).  Splitting the log files into daily versions solves both issues – the resulting files are smaller and more specific and you can add logic to your nightly automation to remove any files older than some many days.

The following is a direct copy from the Clarity Support site:

In order to split the Clarity Logs into Daily files, please follow the next steps:

  • 1. Open the Log4net.config file located in the Clarity Systems/ClarityServer/Web/Config folder
  • 2. Create a backup of the log4net.config file
  • 3. locate the appender-ref tags situated in the <root> and <logger name> tags
  • 4. change the root appender ref tag to <appender-ref ref=”RollingFileAppender” />
  • 5. change the appender ref tag situated in the logger name tag to <appender-ref ref=”RollingReferenceAppender” />

 The final result should look like:

<level value=”ERROR” />
<appender-ref ref=”RollingFileAppender” /> <!– Change to RollingFileAppender to roll over log files based on date. –>

<logger name=”Reference” additivity=”false”>
<level value=”ERROR” />
<appender-ref ref=”RollingReferenceAppender” /> <!– Change to RollingReferenceAppender to roll over log files based on date. –>

  • 6. Stop the Clarity COM+ components
  • 7. Restart IIS

As a result of these actions, the Clarity and Clarity Reference logs will split daily.


I invite any comments or feedback on my posts, including ideas for new ones!

– Jay