Purge System Logs

The Purge System Logs task deletes old log entries to save space in the database and on the server.

This task uses a stored procedure in the database to delete log entries after a specified number of days has passed. You can optionally delete session data from the database as well.

Alternatively, you can truncate the log tables. This option uses a different stored procedure to clear all data from the log tables.

If you're using text file logging, you also have the option to delete physical files from the server. This option deletes .txt and .xml files from your Infor Public Sector log directory and subdirectories after the specified number of days.

Note: The task will also delete any other .txt or .xml files that you have placed in the log directory.

Finally, if you're using ION BODs to integrate with other systems, you can also purge messaging logs. This option uses a stored procedure called CORE_MESSAGING.usp_PurgeMessagingLogs to delete logs from the CORE_MESSAGING tables.

Note: This task is enabled by default in a multi-tenant environment, and cannot be modified or disabled.

Setup

This table describes the Configuration Editor settings that affect this task:

Configuration Comments
Logging configuration Defines the type of logging that your system uses and the location where log files are stored.

Invocation

The Purge System Logs task can be scheduled or invoked manually from the Batch Manager form, and it can be invoked through the console.

This table describes each parameter for this task:

Form Console Description
Delete Database Log Entries DeleteLogTables (bool) Select this option to delete log entries from the database.
Retention Days LogRetentionDays (int) Number of days to retain system logs. Log entries will be purged after this number of days has passed.
Truncate Database Entries TruncateTables (bool) Select this option to truncate the log tables. This will clear all log database logs regardless of the retention days.
Delete Physical Files DeleteFiles (bool) Select this option to delete log files from the server. This will delete .txt and .xml files from the log directory.
Retention Days LogRetentionDaysFiles (int) Number of days to retain physical log files.
Delete ION BODs DeleteIONBods (bool) Select this option to remove messaging logs from the CORE_MESSAGING tables.
Retention Days LogRetentionDaysBods (int) Number of days to retain messaging logs.
Delete Session Database Records DeleteSessionDatabase (bool) Select this option to remove session data from the CORE.SESSIONDATA table.
Retention Days LogRetentionDaysSessionData (int) Number of days to retain session data.

Multi-tenant environments

In a multi-tenant environment the Purge System Logs task is added automatically and set to run once a day with these parameters:

  • Delete Database Log Entries: True
  • Retention Days: 14
  • Truncate Database Entries: False
  • Delete Physical Files: True
  • Retention Days: 14
  • Delete ION BODs: True
  • Retention Days: 14
  • Delete Session Database Records: True
  • Retention Days: 14

These parameters cannot be modified. Invocation of the task is non-deterministic, meaning it does not always run at the same time. Multi-tenant sites have two Batch Manager threads, so other tasks might be queued while the Purge System Logs task is running.

Data output

This table lists the database tables that are affected by this task:

Table Comments
CORE_MESSAGING tables Stores logs and other information for BOD messages.
CORE.SESSIONDATA Purged session data is removed from this table.
CORE.SYSTEMLOG Stores log entries. Purged log entries are removed from this table.
CORE.SYSTEMLOGMESSAGE Stores messages associated with log entries.

This table lists the Infor Public Sector forms that you can use to review the results of this task:

Form Comments
Lookup Messaging Logs Standard lookup used to review messaging logs.
Lookup System Logs Standard lookup used to review log entries.