---
title: Audit Logfile Retention Count
description: The number of audit log files to retain after rotation. When the specified limit is reached, the oldest file is deleted when a file rotation occurs.
component: java-agents
version: 2025.11
page_id: java-agents:properties-reference:org.forgerock.agents.local.audit.log.retention.count
canonical_url: https://docs.pingidentity.com/java-agents/2025.11/properties-reference/org.forgerock.agents.local.audit.log.retention.count.html
---

# Audit Logfile Retention Count

The number of audit log files to retain after rotation. When the specified limit is reached, the oldest file is deleted when a file rotation occurs.

When the value is `-1`, all rotated files are kept. When the value is, for example, `10`, the current file and nine older rotated files are kept.

|                          |                                                                                                                                                              |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Property name            | `org.forgerock.agents.local.audit.log.retention.count`                                                                                                       |
| Aliases                  | `org.forgerock.agents.local.audit.log.retention.count`   Introduced in Java Agent 5.7   [Recognized](preface.html#how_am_manages_multiple_aliases) from AM 7 |
| Function                 | Audit                                                                                                                                                        |
| Type                     | Integer                                                                                                                                                      |
| Default                  | `-1`                                                                                                                                                         |
| Bootstrap property       | Yes                                                                                                                                                          |
| Required property        | No                                                                                                                                                           |
| Restart required         | Yes - Restart the container after changing the property                                                                                                      |
| Local configuration file | `AgentBootstrap.properties`                                                                                                                                  |
| AM console               | Tab: `Global (from AM 7)`Title: `Audit Logfile Retention Count`                                                                                              |
