How Could I erase the logs from a specific source?
for example,
under application node
i have hundreds logs, that's ok!
but have 37 logs source named: "someapplication"
how can erase just them instead of node entirely?
the code snippet below erase under application node!
i'd avoid that!
is possible?
thanks!
private void clearlog(string logsource, string logname)
{
log.source = logsource;
log.log = logname;
log.clear();
}
eventlog.deleteeventsource(sourcename) trick. not specify logname since every event source name must unique accross event logs anyway.
yours,
alois kraus
yours,
alois kraus
.NET Framework > Common Language Runtime Internals and Architecture
Comments
Post a Comment