Error: Invalid spaceKey on retrieving a related space config.

Enabling server-side AR System logs


When investigating an issue in the AR System plug-in, it helps to enable all relevant logs to capture concurrent activity during testing. These logs might not be required in all cases, but the practice of enabling them during the first test saves the effort of generating new logs if they are required. An exception to this guideline is the case where the AR System Server or the plug-in server must be restarted to enable additional logging. Restarting the AR System server or the plug-in server might impact users who are using the server, so this impact needs to be considered to minimize the impact on users.

Enable the following logs to capture more information about calls to the plug-in. The following logs can be enabled without restarting AR System or the plug-in server:

  • API and SQL log, pointing to the same file
  • Filter log, pointing to a different file
  • Plug-in logging at Debug level, pointing to a different file

Because these logs can grow large, disable them after capturing the issue. The plug-in server logs are enabled and are written to the file specified in the <ARInstallationFolder>/pluginsvr/log4j_pluginsvr.xml file. By default, the logging level is set to Warn, which is the least verbose logging level. Use the following steps to increase the log levels of the plug-in server log.

To increase the Java plug-in server log levels

Perform the following steps to increase the Java plug-in server log levels:

  1. Open AR System Administration Console.
  2. Select System > General > Plugin Server Configuration.
    The Plugin Server Configuration form is displayed.
  3. In the Logging Configurations area on the Plugin Server Configuration tab, select debug from the Log Level list for the specific plug-in.
  4. Click Apply.
    The log level is saved to the Centralized Configuration.

However, if you want to capture the logging before configurations in the Centralized Configuration are loaded, perform the following steps:

  1. Open the <ARInstallationFolder>/pluginsvr/log4j_pluginsvr.xml file for editing.
  2. Change the log level value from warn to debug for the specific plug-in.
    For example, change the following lines in the log4j_pluginsvr.xml file for CAI plug-in:

    <logger additivity="true" name="com.bmc.itsm.cai.filterapi.cai">
        <level value="warn"/>
    </logger>
    

    to

    <logger additivity="true" name="com.bmc.itsm.cai.filterapi.cai">
        <level value="debug"/>
    </logger>
    

By default, the arjavaplugin.log file located in the <ARInstallationFolder>\Arserver\Db folder logs the debug messages for the plug-in. You can, however, edit the log4j_pluginsvr.xml file and manually edit the log file path and name, maximum log file size, and the number of backup files to keep. For example, search for the section that begins with <appender class="org.apache.log4j.RollingFileAppender" name="PluginLog">. For example:

<appender class="org.apache.log4j.RollingFileAppender" name="PluginLog">
    <param name="File" value="C:/BMC Software/ARSystem/ARServer/Db/arjavaplugin.log"/>	
    <param name="MaxFileSize" value="5MB"/>
    <!-- Keep two backups -->
    <param name="MaxBackupIndex" value="10"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p [%t] %C (%F:%L) - %m%n"/>
    </layout>	    
</appender>

Manually change the file name, maximum log file size, and number of backup files as follows:

<appender class="org.apache.log4j.RollingFileAppender" name="PluginLog">
    <param name="File" value="D:/TEMP/arjavaplugin.log"/>	
    <param name="MaxFileSize" value="100MB"/>
    <!-- Keep two backups -->
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p [%t] %C (%F:%L) - %m%n"/>
    </layout>	    
</appender>

To enable additional logging in the Java server

  1. Open the <ARInstallationFolder>\conf\logback_server.xml file for editing.
  2. Change the log level value from warn to trace for the specific plug-in.

    <logger name="com.bmc.arsys.fts.impl.lucene"
                            level="warn" additivity="false">
                            <appender-ref ref="FTSSearchEngineLog" />
    </logger>

     to

    <logger name="com.bmc.arsys.fts.impl.lucene"
                 		level="trace" additivity="false">
                            <appender-ref ref="FTSSearchEngineLog" />
    </logger>
  3. Restart the AR System server.

Related topics

Running the plug-in server
Setting log files options

Was this page helpful? Yes No Submitting... Thank you

Comments