How to Enable Logging for RMM
Is your connection from Rhapsody to Rhapsody Model manager giving you problems ? Here's how to enable logging to get more information about what might be going wrong:
First open the <Rhapsody Install Directory>\Share\Profiles\RhapsodyModelManager\log4j.properties file in a text editor.
(If you are using Rhapsody version 9 or above then look inside UserShare rather than Share
If you do not find a log4j.properties file then you are using a version of Rhapsody where they switched from a properties file to an XML file (log4j2.xml)
In the Properties File:
1. At the top of the file, comment out the line log4j.rootLogger=OFF
2. Remove the hash at the start of the line log4j.rootLogger=INFO, file to 'uncomment' it
#log4j.rootLogger=OFF
log4j.rootLogger=INFO, file
3. Scroll down to the OSLC Operations section and set the following properties to TRACE:
log4j.logger.com.ibm.rational.rhapsody.oslc log4j.logger.com.ibm.rational.rhapsody.oslc.timing
log4j.logger.com.ibm.rational.rhapsody.oslc=TRACE
log4j.logger.com.ibm.rational.rhapsody.oslc.timing=TRACE
4. Optional - Set log4j.appender.file.File property with a log file name and path (using a forward path separator). If you do not set this then the log file will be generated to the default directory: <model path>/OSLC_<rhapsody process id>.log
In the XML File:
1. Comment out the <Root level="OFF" /> line by wrapping it like the other comments in the file:
<!-- <Root level="OFF" /> -->
2. Uncomment the next three lines by removing their wrappers:
<Root level="INFO">
<AppenderRef ref="file"/>
</Root>
3. Set the loggers for com.ibm.rational.rhapsody.oslc and com.ibm.rational.rhapsody.oslc.timing to TRACE:
<!-- OSLC command execution -->
<Logger name="com.ibm.rational.rhapsody.oslc" level="TRACE"/>
<!-- OSLC operation timing -->
<Logger name="com.ibm.rational.rhapsody.oslc.timing" level="TRACE"/>
To redirect the log file edit the filename property on the RollingFile tag, for example:
<RollingFile name="file" filename="C:/Work/${app}.log" filePattern="${app}-%i.log">