How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I clear debug logs in AM (All versions)?

Last updated Apr 13, 2021

The purpose of this article is to provide information on clearing your debug logs in AM when they get too large (for example, you previously set the debug level to message) and you no longer need them. You can also use this information to clear other logs, such as agent logs. Clearing debug logs as opposed to deleting them negates the need to stop and start your AM server. The information in this article applies if you are using a UNIX® or Linux® system.


2 readers recommend this article

Clearing an individual debug log

You can clear an individual debug log as follows from your terminal window:

  1. Change directory to your debug directory (which is typically located in the /path/to/openAM/ directory).
  2. Copy any logs you may want to keep. Once you run the next command, the logs will be permanently gone.
  3. Enter the following command: $ cat /dev/null >[filename] replacing [filename] with the name of the debug log file you want to clear.

Clearing all debug logs in the debug directory

You can clear all debug logs in the debug directory as follows:

  1. Copy any logs you may want to keep. Once you run the next command, the logs will be permanently gone.
  2. Enter the following command in your terminal window: $ for file in /path/to/openAM/debug/*; do > $file; doneto empty all the debug log files in the debug directory.

Alias

You could also create an alias to run this command to make it easy to re-use. For example, enter the following command:

$ alias flushamdebug='for file in /path/to/openAM/debug/*; do > $file; done'

and then just enter the following command to run it at any time:

$ flushamdebug

See Also

How do I enable Message level debugging in AM (All versions) debug files?

How do I enable debug logging for troubleshooting Agents (All versions)?

How do I rotate AM 5.x and 6.x debug logs?

How do I rotate Java Agents 5, 5.5 and 5.6 debug and audit logs?

How do I clear stats logs in AM (All versions)?

Related Training

N/A

Related Issue Tracker IDs

N/A


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.