How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I change the location of log files for DS (All versions)?

Last updated Jan 12, 2023

The purpose of this article is to provide information on changing the location and/or name of log files for DS. By default, DS stores the log files in the /path/to/ds/logs directory.

Changing the location of log files

DS uses log publishers to define log details for each log type, including the log location and name.

You can change the log location and/or log name by using dsconfig and updating the value of the log-file property. For example, this property defaults to logs/access for the access log, which is a relative path to the DS directory.

You can run the dsconfig command to change this. For example:

  • DS 7 and later: $ ./dsconfig set-log-publisher-prop --publisher-name [publisherName] --set log-file [filePath] --hostname --port 4444 --bindDN uid=admin --bindPassword password
  • DS 6.x: $ ./dsconfig set-log-publisher-prop --publisher-name [publisherName] --set log-file [filePath] --hostname --port 4444 --bindDN "cn=Directory Manager" --bindPassword password

Where [publisherName] is the name of the specific log you are updating. See About Logs for different log types and their corresponding name.

Alternatively, if you run dsconfig in interactive mode, you can navigate to: 21) Log Publisher > 3) View and edit > [Log File Type] > 5) log-file and amend the name and location. You can enter a full path, such as /logs/ds, rather than one that is relative to the DS directory if required.


You can also configure the log retention and log rotation options in a similar way using the dsconfig set-log-retention-policy-prop and dsconfig set-log-rotation-policy-prop commands respectively, or by navigating to 22) Log Retention Policy and 23) Log Rotation Policy when using dsconfig in interactive mode.

See Also

About Logs


Access Log Publisher

Related Training


Related Issue Tracker IDs


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