내 응용 프로그램에 대한 이벤트 로그를 읽으려고합니다. EventLoggingApp. 문제는 내 단일 소스 (EventLoggingApp)에 대한 로그를 읽는 것입니다.C에서 이벤트 로그 읽기
이 코드는 모든 소스에 대한 로그를 읽습니다. 문제가 무엇입니까? 어떤 충고?
static void ReadEvenLog()
{
string eventLogName = "Application";
string sourceName = "EventLoggingApp";
string machineName = "Tom";
EventLog eventLog = new EventLog();
eventLog.Log = eventLogName;
eventLog.Source = sourceName;
eventLog.MachineName = machineName;
foreach (EventLogEntry log in eventLog.Entries)
{
Console.WriteLine("{0}\n",log.Source);
}
}
을 그가 모든 로그를 얻을 수 있기 때문에 자신의 컴퓨터에서 보안 문제가 없습니다. – atamanroman