By default, Application Real-Time Monitoring Service (ARMS) writes agent logs to a predefined directory. You can redirect agent logs to a custom directory by setting an environment variable or a JVM startup parameter.
Method 1: Set the JM_LOG_PATH environment variable
Set the JM_LOG_PATH environment variable before you start your application:
export JM_LOG_PATH=/var/log/armsReplace /var/log/arms with the path to your target directory.
Method 2: Add the -DJM.LOG.PATH JVM startup parameter
Pass -DJM.LOG.PATH as a JVM option when you start your application:
java -DJM.LOG.PATH=/var/log/arms -jar your-application.jarReplace /var/log/arms with the path to your target directory.
Configuration reference
| Method | Syntax | Example |
|---|---|---|
| Environment variable | export JM_LOG_PATH=<path> | export JM_LOG_PATH=/var/log/arms |
| JVM startup parameter | -DJM.LOG.PATH=<path> | java -DJM.LOG.PATH=/var/log/arms -jar app.jar |