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

SQL Server 2008 - High Memory Usage

Problem In Configuring Biztalk 2009 In Creating A ReceivePort.When I Try To Create A Receive POrt I Got This Error

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts