//HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application

            string source = "WCF Event Log";
            if (!EventLog.SourceExists(source))
            {
                EventLog.CreateEventSource(source, "Application");
            }

            EventLog myLog = new EventLog();
            myLog.Source = source;
            myLog.WriteEntry("1111", EventLogEntryType.Error);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2021-12-05
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-26
  • 2022-01-31
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案