Run the plug-in server
Log plug-in information
Plug-ins can write information to the plug-in server log file. C plug-ins can use the ARPluginSetProperties function to call the plug-in log function:
typedef int (*AR_PLUGIN_LOG_FUNCTION)(
ARPluginIdentificationasdfasdfasdfas*id,
intasdfasdfasdfasdfasdfaassdfasdfasdfasdfalogLevel,
charasdfasdfasdfasdfasdfaasdfasdfasdfasdfa*text);
Argument | Description |
---|---|
id | The plug-in type, name, and version. |
logLevel | The log level to which the information applies: You can specify a log level for each situation. This enables the plug-in to write different information to the log file depending on the log level configured for the plug-in server. The information is not written to the log file unless the plug-in server log level is equal to or lower than the value of logLevel.
|
text | The message that is written to the plug-in server log file. |
The C plug-in log function has no return value.
Java plug-ins can log messages using the logMessage method of their ARPluginContext object. For more information, see the Java plug-in API online documentation located at ARSystemServerInstallDir\ARserver\api\javaplugins\arpluginsdocVerNum.jar.
Setting log level for plug-ins
To set the log level for the C-based plug-in server, use the Plugin_Log_Level option on the Log Files tab of the AR System Administration: Server Information form.
The Java plug-in server uses the log4j utility. Set the log level and other logging configurations in the log4j2_pluginsvr.xml file. Comments in the sample file describe the log configuration options.
For more information, see Setting-log-files-options.
Log exceptions for calls to Java plug-ins
When a runtime exception or an ARException class error occurs during a Java plug-in server call to a Java plug-in, the following information is recorded in the ARServerInstallDir\Arserver\Db\arjavaplugin.log file:
- The name of the plug-in.
This name matches the name of the corresponding plug-in library registered in the Java plug-in configuration file, pluginsvr_config.xml. For example, if the library is registered as <name>DSO.FILTERCONFIGURATION</name>, the plug-in name in the log file is DSO.FILTERCONFIGURATION. - The method that the server tried to call in the plug-in.
- (Runtime exceptions only) The exception stack trace.
In addition to the information written to a log file, Error 8753: Error in plugin: pluginName is also displayed to the user.
When an ARException occurs, users receive the usual message associated with the exception.
When you restart the AR System server, arjavaplugin.log might log warnings that look similar to this:
2009-10-14 11:07:12,573 WARN pool-2-thread-1com.bmc.arsys.pluginsvr.plugins.ARPluginContext (?:?) -<ARSYS.ARF.REGISTRY>Null registry location
You can safely ignore these messages. If you want to use the Registry, enter the Registry location in the AR System Administration Console. For more information, see Registering-a-web-service.
C plug-in exception handling
Exception handling in the C plug-in server produces a stack trace. The stack trace includes the names of the operation, vendor, and plug-in library. It is written to the arerror.log file.