Execution Log in irSDK

  • Updated

In 5.7.3, the IRuleExcutionLogSink interface has been added to irSDK runtime and can be used by a consumer to access the RuleExecutionLog post rule execution. This can be configured via the following irSDK properties:

  • RuleSession.Settings.RuleExecutionLogSink (assign an instance of a class that implements the IRuleExecutionLogSink interface
  • Rulesession.Settings.RuleExecutionLogSinkServiceName (assign a unique name specific to the service consuming the logs)

The class that implements this interface may also be configured in the consuming application's .config file instead of adding irSDK code using the following appSettings:

  • <add key="inrule:runtime:ruleEngine:ruleExecutionLogSinkAssemblyName" value="MyLogSinkAssembly" />
  • <add key="inrule:runtime:ruleEngine:ruleExecutionLogSinkTypeName" value="Acme.MyLogSink.Logger" />
  • <add key="inrule:runtime:ruleEngine:ruleExecutionLogSinkServiceName" value="Production2" />

The consumer class that implements the IRuleExecutionLogSink interface can implement either the EmitLogAsync() or EmitLog() methods or both if desired. The method that is called will depend on whether RuleSession.ApplyRules() or RuleSession.ApplyRulesAsync() is called.

Was this article helpful?

0 out of 0 found this helpful



Please sign in to leave a comment.