Skip to content

Log Archive

Johannes Fischer edited this page Nov 11, 2021 · 2 revisions

Overview

Platform events are currently stored for up to 72 hours, after which they are discarded. In addition, there are Governor limits with respect to the number of Platform Events that can be received by endpoints, which Log Monitor is one of them. This can have a significant impact on the environment, especially if Platform Events are actively in use. That's the reason why the Log Archive was introduced, it allows for events to be logged in a Big Object, which can then be queried for analysis using Log Monitor.

Log Monitor - Archive Mode

Configuration

To activate writing log events to the archive, set the Archive Log Level to any level between INFO and FATAL.

Viewing Logs

In Log Monitor, switch the Connection Mode to "Archive" (1), which will automatically query and display all logs for the current day and render the additional controls. There can only be a maximum of 50,000 log records be displayed at a given time. Use the date-time fields in the title bar (2) to query a subset of the logs that are stored in the archive. If the start time is left blank, it will use the beginning of the current day. If the end time is left blank, it will use NOW as the end time for the query. Next, filter the logs using the the standard input fields (3) as one would do it with the traditional log modes.

Deleting Logs in the Archive

Clear Log Archive

The logs in the archive persist, which is good for analytical purposes and investigations that require more than 72 hours of access to the logs. However, this also means that the log table can fill up over time and eventually hit the maximum records Governor limit, which would prevent new records from being written. The archived log records can be deleted in batches of 50,000 records at the time using the "Clear Archive" menu item (5) that can be found in the Gear button menu (4).

After confirming the item, up to 50,000 records starting with the oldest record in the Big Object table will be deleted.

Please note, at this time there is no ability to reduce the number of records to be deleted or select a specific time frame for the deletion.

Clone this wiki locally