Table – EventLog

Purpose

Used to track events raised during execution of the framework. The client devices will log events through the core API, the API’s and other server code will add through a C# library. Events added through the library can also be sent to MS Application Insights to be integrated with other telemetry from the servers.

Events can also be added to the log directly by T-SQL stored procedures in the database. These are not sent to MS Application Insights.

Definition

CREATE TABLE [dbo].[EventLog](
	[LoggedByGUID] [UNIQUEIDENTIFIER] NOT NULL,
	[LoggedOn] [DATETIME2](7) NOT NULL,
	[Location] [VARCHAR](500) NOT NULL,
	[Severity] [INT] NOT NULL,
	[Context] [VARCHAR](MAX) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE NONCLUSTERED INDEX [IX_EventLog_LoggedOn] ON [dbo].[EventLog]
(
	[LoggedOn] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO

Column Definitions

The LoggedByGUID tracks the InstanceGUID of the user that raised the event.

The LoggedON provides a timestamp of when the event occured. Since multiple events could possibly be raised in the smallest time interval, this isn’t used as a primary key. Instead we add a secondary index to time order events in the log – which allows for duplicates LoggedOn keys for different events.

The Location indicates which piece of code has logged the event.

the Severity indicates how severe the event was. The following severity scale is used:

  • 0 – Critical Error – currently un-used – reserved to indicate that the infrastructure has failed and needs some manual assitance.
  • 1 – Error – the most common level which indicates that there has been an error in processing that was in some way handled by the application.
  • 2 – Information – used during development to track the progress of workflow.

The Context includes additional information that can help the support team diagnose and resolve the event.

Updated on November 23, 2022

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment