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. An exception to this guideline is the case where you must restart the AR System server or plug-in server to enable additional logging.

Restarting AR System server or the plug-in server might impact users who are using the server. You must consider the impact and try to minimize it.

Enable the following logs to capture more information about calls to the plug-in. You can enable the following logs 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

Make sure to disable the logs after capturing the issue to prevent them from growing too large.


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. Perform the following steps to increase the log levels of the plug-in server log:

To increase the Java plug-in server log levels

  1. Open AR System Administration console.
  2. Select System > General > Plugin Server Configuration.
  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.
  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 debug messages for the plug-in are logged in the arjavaplugin.log file located in the <ARInstallationFolder>\Arserver\Db folder. You can 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">:

<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>

For example, change the file name, maximum log file size, and number of backup files:

<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. Edit the logback_server.xml file by using ConfigMaps.
    For more information, see the topic Using ConfigMaps to access the configuration files.
  2. Change the log level 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 AR System server.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*