---
title: Configuring log retention
description: The server allows you to configure the log retention policy for each log on the server.
component: pingauthorize
version: 11.0
page_id: pingauthorize:pingauthorize_server_administration_guide:paz_config_log_retention
canonical_url: https://docs.pingidentity.com/pingauthorize/11.0/pingauthorize_server_administration_guide/paz_config_log_retention.html
revdate: August 29, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
  example: Example:
---

# Configuring log retention

The server allows you to configure the log retention policy for each log on the server.

## About this task

When a retention limit is reached, the server removes the oldest archived log before creating a new log. Log retention is only effective if you have a log rotation policy in place.

If you create a new log publisher, you must configure at least one log retention policy.

* File Count Retention Policy

  Sets the number of log files you want the server to retain. The default file count is 10 logs. If the file count is set to 1, then the log continues to grow indefinitely without being rotated.

* Free Disk Space Retention Policy

  Sets the minimum amount of free disk space. The default free disk space is 500 MB.

* Size Limit Retention Policy

  Sets the maximum size of the combined archived logs. The default size limit is 500 MB.

* Time Limit Retention Policy

  Sets the maximum length of time that rotated log files should be retained.

* Custom Retention Policy

  Create a new retention policy that meets your server's requirements. This requires developing custom code to implement the desired log retention policy

* Never Delete Retention Policy

  Used in a rare event that does not require log deletion.

## Steps

* Use `dsconfig` to modify the log retention policy for the access logger.

  ### Example:

  ```shell
  $ bin/dsconfig set-log-publisher-prop \
    --publisher-name "File-Based Access Logger" \
    --set "retention-policy:Free Disk Space Retention Policy"
  ```
