Is there a way to send the log messages from Java custom plugin to Sigma logs using the Sigma APIs?
System.out.println messages from custom Java code shows up in wildfly logs.
Follow the instructions in the Product Documentation - Developing a Java Plugin
using the Example from the Documentation - Plugin Samples
and was able to write get this to write log messages.
Here is the Example code:
package org.ca.idp.pluging_logger; <<<<----------------------------------- package setup
import com.idmlogic.sigma.plugin.BasePlugin;
import com.idmlogic.sigma.plugin.annotations.ExportedServerFunction;
public class pluginLogger extends BasePlugin {
@Override
public void initPlugin() {
System.err.println("init");
}
@ExportedServerFunction
public void foo() {
System.err.println("foo error");
System.out.println("running foo");
}
}
Do not forget to place your complied class under the plugin directory configured on Admin UI/Setup/General configuration, my compiled class was placed under:
{plugin directory}/org/ca/idp/plugging_logger ,this match to my package setup.
Use <Identity_Portal_url>/rest/admin/plugins/refresh URL to reload all available classes in the plugin directory,
and now you should be able to configure the plugin in the 'Plugins' Elements on Admin UI