The events and user actions of OntoBroker are logged by the log4j logging mechanism using the log4j categories [EVENT] and [USER_ACTION]. The log includes user information if OntoBroker is running as a server.
<OntoBroker installation directory>/config/auditing contains template files for configuring log4j to activate events and user actions logging. Refer to the README.txt file in the same directory.
|•||Change events like axioms added, ontology deleted, ...|
fired by an ontology or ontology manager can be logged as well as these user actions:
The detail level of the log info depends on the log message format, see below.
The logging mechanism is an OntoBroker feature. If using OntoStudio to access an OntoBroker server, the following point should be considered.
|•||An OntoStudio operation like deleting a class A may trigger multiple OntoBroker events, e.g. "removed all instances of class A", "removed all sub classes of A", "removed all super classes of A". I.e. an OntoStudio operation does not generate an atomic log entry but may be reflected by several OntoBroker change events.|
Log Message Formats
log4j provides a mechanism to render a message from a given object which is going to be logged. Rendering can be customized by providing an implementation of the log4j interface ObjectRenderer. log4j can be configured to use such a custom renderer to render objects of a particular type using the renderer attribute:
The object which OntoBroker logs for events are of the type com.ontoprise.util.logging.DatamodelEventLogEntry, the ones for user actions are of the type com.ontoprise.util.logging.useraction.UserActionLogEntry.
Refer to section 'Activate Logging' for setting up a particular log message format.
If no log4j renderer is configured for logging related object types, the toString() method on the objects is used as usual. In general the plain format includes only a few pieces of information about the logged events or user actions.
Comma Separated Values (CSV)
The log output can be formatted as list of comma separated values which, for example, is used by spreadsheet programs.
If ObjectLogic is used as output format, OntoBroker/OntoStudio can be used to access the log information. Ontologies describing the schema of the logged data are located in <OntoBroker-Installation-Directory>/config/auditing (event-schema.obl and user-action-schema.obl).