
代码StringBuilder sb = new StringBuilder();
EventLog mylog = new EventLog();
mylog.Log = " Application " ; // System[系统日志] | Application[应用日志] | Security[安全日志]
EventLogEntryCollection myCollection = mylog.Entries;
for ( int i = 0 ; i < myCollection.Count; i ++ )
{
sb.Append( " Time: " + myCollection[i].TimeGenerated + " " +
myCollection[i].Message + " <br /> " );
}
本文标题:c# 查询本机日志
本文链接:https://blog.quwenai.cn/post/5229.html
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。






还没有评论,来说两句吧...