I have an C#.net core 3.1 console application, it supports on Linux platform.
I need to get event log(like event viewer application logs in Windows) information from Linux , but i got runtime error:
Event Log not supports on Linux platform.
Please find the below code,
**EventLog log = new EventLog("Application");
Console.WriteLine("Application event log...");
for (int index = 0; index < log.Entries.Count; index++)
EventLogEntry entry = log.Entries[index];
Console.WriteLine("source " + entry.Source);
Console.WriteLine("Message " + entry.Message + " " + "Time " + entry.TimeWritten);
Please help me on this issue.
How to get event logs from Linux using c#.net?