The Event Log System

The event log is a generalized logging table that is located in a database, usually in a common area, and is available to applications, stored procedures, etc., that need a logging capability. There are also two stored procedures that provide logging and clearing interfaces.

The Event Log Viewer displays entries in the event_log that are written to meet an application's logging requirements, using either the LogEvent object or a stored procedure.

The event viewer encapsulates a TQuery and a TDataSource component, used to pull selected information from the event log. The TQuery's SQL text contains the column names and the event log database, which can be changed as required; this SQL text is retained as different queries are run while the event viewer is active.

Data is pulled from the event log by matching column values with settings made on the viewer's form. These are:


An example of the Event Log Viewer from an application.