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



.NET Framework  >  Common Language Runtime Internals and Architecture



Comments

Popular posts from this blog

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

Azure DocumentDB Owner resource does not exist

SQL Server 2008 - High Memory Usage