Audit Log in memory

Similar to how the data built for an output card can be echoed back to a calling map or application, the audit log, including Data and Execution information, can be placed in memory using the MapAudit execution command (-A) with the M option and echoed back to its calling map or application with the E option

.

If the audit in memory fails, either of these messages might be returned from the Command Server: Disk write error or Not enough memory to execute map.

The -AEM audit option can be useful when using a RUN function or the Platform API to place the audit log in memory during map execution and then to return it, along with any outputs being echoed back. Placing the audit log in memory avoids the file I/O necessary if the audit log was written to disk.

For example, if used in a RUN() function, enter:


RUN ("some_map.mmc","-AEM -WM -OE1")

This results in the execution of some_map.mmc and returns the concatenation data created for output card 1 and the audit log data.

When the audit log data is returned in this function implementation, it still adheres to the format described by the audit.mtt schema included in the examples directory.

When the audit log is written to memory and is echoed back to the calling map or application, it is appended to any echoed outputs. Therefore, if output cards 2 and 4 were echoed, along with the audit log, the data for output card 2 is followed by the data for output card 4, which is followed by the contents of the audit log.