Creating Audit Log Entries
Use
You use the audit log to write and persist log entries for a message. These entries indicate how an actual message instance was processed in the Adapter Framework and on the Integration Server.
Interface Overview
| Characteristic | Value |
|---|---|
|
Name |
Adapter Framework audit log |
|
Purpose |
Writes entries to the AF message log, checks time of persistence. |
|
Type |
AS Java interface in facade com.sap.aii.af.ifc.facade |
|
Technical name |
com.sap.engine.interfaces.messaging.api.auditlog |
|
Certification |
Optional |
|
Syntax |
Javadoc (.\index.html) package com.sap.engine.interfaces.messaging.api.auditlog |
Prerequisites
- Before audit log entries can be written, you must gain access to an object that implements AuditAccess.
To do this, use the object PublicAPIAccess. getAuditAccess() gives you an AuditAccess object.
More information: XI Message Interfaces
- To link the audit log entry to a message, you must instantiate a MessageKey object when writing the audit log entry.
Features
Methods for Audit Monitoring
| Class/interface | Method Name | Method |
|---|---|---|
|
AuditAccess |
addAuditLogEntry |
Use the AuditMessageKey |
|
AuditAccess |
flushAuditLogEntries |
Writes audit log entries to the database. All audit log entries are collected in the memory before the method is called. |
|
AuditLogStatus |
Valid status entries |
|
|
Message Key |
Write the log entry as is shown in the following example:
Checking the Messages in the Message Monitor
- To be able to display the payload of a synchronous message in the message monitor, you can convert a service property for your adapter test.
- In the serviceXPI AF Messaging.System, set the following property:
Messaging.syncMessageRemover.removeBody = false
More information: Properties for Service XPI AF Messaging System