Write to Windows Application Event Log

后端 未结 5 1065
花落未央
花落未央 2020-11-28 02:23

Is there a way to write to this event log:

\"enter

Or at least, some other Win

5条回答
  •  北海茫月
    2020-11-28 02:46

    try

       System.Diagnostics.EventLog appLog = new System.Diagnostics.EventLog();
       appLog.Source = "This Application's Name";
       appLog.WriteEntry("An entry to the Application event log.");
    

提交回复
热议问题