
# Configuring Cascade CMS Log Rotation and Compression

> This article is provided as an example of how to configure Cascade CMS application logging to use rotation and/or compression.

URL: https://www.hannonhill.com/cascadecms/latest/articles/cascade-administration/installation-and-upgrades/system-configuration/logging-rotation-compression.html
category: Cascade Administration
article-type: how-to
content-kind: article
release-availability: all
tags: installation
updated: 2026-10-06

## Overview

This article is provided as an example of how to configure Cascade CMS [application logging](https://www.hannonhill.com/cascadecms/latest/articles/cascade-administration/diagnostics/cascade-cms-log-files.html) to use rotation and/or compression. It is for informational purposes only, and Hannon Hill Product Support cannot provide Log4j2 configuration support or assistance.

## Enabling log rotation

Cascade CMS application logging can be configured remove older log files over a specified number of rotations. To do so:

- On the application server, locate and edit `tomcat/webapps/ROOT/WEB-INF/classes/log4j2.properties`.
- Locate each of the commented-out lines that look like the following:
    ```velocity
    #appender.APPENDER_NAME.strategy.type = DefaultRolloverStrategy
    #appender.APPENDER_NAME.strategy.max = ${ROTATION_STRATEGY_MAX}
    ```

- Uncomment these lines by removing the hash sign (`#`) from the beginning of the line.
- Save the changes.
- Restart Cascade CMS.

> **Note**
>
> By default, rotation is configured to 7 days. To change this setting, locate the `property.ROTATION_STRATEGY_MAX` property towards the top of the same `log4j2.properties` configuration file and adjust the value to the desired number of days.

## Configuring log file compression

You can enable or disable automatic compression of rotated application log files using the following steps:

- On the application server, locate and edit `tomcat/webapps/ROOT/WEB-INF/classes/log4j2.properties`.
- Locate the `property.LOG_ROTATION_FILE_PATTERN` property towards the top.
    - **Enable compression:** add a `.gz` (or `.zip`) extension to the filename pattern
    - **Disable compression:** remove the `.gz` (or `.zip`) extension from the filename pattern
- Save the changes.
- Restart Cascade CMS.
