Activity Log API

To start generating Activity log entries the developer must start working on the Logged Knowledge Base. If using K2BTools many log entries are automatically generated as long as the Activity log is activated (see Activate K2B Activity Log) and Patterns are reapplied.

If manual activity log entries are needed the developer must use the Activity Log API, that is very simple to use. It is exposed in the K2BLog module.

Structured entries

To add a structured entry the developer should call AddStructuredMessage procedure or one of the simplified formats below.

AddStructuredMessage has the following parameters. The simplified formats do not have the first one.

Parameter Description
&EntryType A K2BLog.EntryType domain value (Information, warning or error)
&ProgramName Object generating the entry.
&AttributeValueCollection Collection of property-value style values that are relevant to the entry
&Class K2BLogEntryClass domain value that the entry belongs to.
&LogLevel A K2BLog.LogLevel doman value (Low, medium, high)

Simplified structured message APIs

Object Purpose
AddStructuredInformationMessage Add an information message
AddStructuredWarningMessage Add a warning message
AddStructuredErrorMessage Add a error message

Unstructured entries

Unstructured entries are entries that do not have a predefined structure. To add a unstructured entry the developer should call AddMessage procedure or one of the simplified formats below.

AddMessage has the following parameters. The simplified formats do not have the first one.

Parameter Description
&EntryType A K2BLog.EntryType domain value (Information, warning or error)
&Text Collection of property-value style values that are relevant to the entry
&Class K2BLogEntryClass domain value that the entry belongs to.
&ProgramName Object generating the entry.
&LogLevel A K2BLog.LogLevel doman value (Low, medium, high)

Simplified structured message APIs

Object Purpose
AddInformationMessage Add an information message
AddWarningMessage Add a warning message
AddErrorMessage Add a error message