Skip to Content

Scripting Example - Event Log

This example demonstrates how to write to the Windows Event Log from an action.

Table Schema

Column Data Type Primary Key Auto-generate Nullable

Script

using System.Diagnostics;

using (var eventLog = new EventLog("Application"))
{
    eventLog.Source = "Application";
    eventLog.WriteEntry("Vinyl sounds better.", EventLogEntryType.Information, 101, 1);
}