REST API to the Event log
Posted: Mon Jun 28, 2021 6:43 pm
Will the self hosted api write to the event log with some code added such as the below provided the user the service is running under has the correct permissions.
- Code: Select all
public void LogToEventLog(string Message, System.Diagnostics.EventLogEntryType EventLogEntryType)
{
System.Diagnostics.EventLog Log = new System.Diagnostics.EventLog("Application");
Log.Source = string.Format("Jiwa Plugin : {0}", "REST API");
Log.WriteEntry(Message, EventLogEntryType);
Log.Close();
}