How to redirect server.log output

book

Article ID: 142242

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal CA Identity Suite

Issue/Introduction

Where CA Identity Manager has been deployed with Jboss\ Wildfly, the application logs (server.log) is stored in a path relative to the installation folder (%Jboss%\standalone\log). 

 

For example:

c:\wildfly-8.2.1.Final\standalone\log\server.log

 

There are some circumstances where it may be necessary to redirect the CA Identity Manager Jboss\ Wildfly application logs to a different location.  For example where disk space is running low.

 

Environment

Release : 14.x

Component : IdentityMinder(Identity Manager)

Resolution

In order to redirect the server.log to a different drive\ location, you need to edit the "standalone.bat" file located in

<JBoss>\bin\ folder

for example:

c:\wildfly-8.2.1.Final\bin



locate the line 

 

set "SERVER_OPTS=%SERVER_OPTS% -c %STANDALONE_CONFIGURATION% -b %BIND_ADDRESS% %IDM_OPTS% -Djboss.as.management.blocking.timeout=900"

and append the following command with the desired log path (create the folder manually)

 

-Djboss.server.log.dir=<path>

 

The completed syntax should look like the line below;


set "SERVER_OPTS=%SERVER_OPTS% -c %STANDALONE_CONFIGURATION% -b %BIND_ADDRESS% %IDM_OPTS% -Djboss.as.management.blocking.timeout=900 -Djboss.server.log.dir=c:\JbossLogs"



Once you have made the changes save the file and restart the instance of Jboss\Wildfly for the logging changes to take effect.

Additional Information

Please note that these changes are being applied to the JBoss logging sub-system which may not be exclusive to the CA IM Application.  Additionally, you application will require the appropriate read-write permissions on the destination path (where you want to store the log files). Before making these changes please discuss with your application server administrator and\ or system administrator to ensure that you have the appropriate rights and permissions..