Profiler seems not to work with log4net

Code profiling for .NET Developers

Moderators: Luke Jefferson, StephenC, Alex.Davies, AndrewH, melvyn.harbour, Laura Morley

Profiler seems not to work with log4net

Postby wsyeager » Wed Nov 16, 2011 9:12 pm

I started a profiling session for a .Net executable, but it seems to be conflicting with log4net.

I get the following error when the profiling job is started:

log4net:ERROR [RollingFileAppender] Unable to acquire lock on file d:\\logs\\xxxx.log. The process cannot access the file 'd:\\logs\\xxxx.log' because it is being used by another process.

What can I do to successfully enable the profiling session?
wsyeager
 
Posts: 2
Joined: Wed Nov 16, 2011 8:59 pm

Postby Brian Donahue » Thu Nov 17, 2011 1:38 pm

I can't say as we have never seen this problem before. Profiler also uses Log4Net, but it logs to a location that would more than likely not interfere with yours.

Are you able to work out which process is using the file? Maybe it's antivirus as that does wonderful, random things once you introduce the profiler core component into a process.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby wsyeager » Thu Nov 17, 2011 7:15 pm

Brian, going another route....

I don't see an option to profile a web service that is hosted on IIS.

How would I do that?
wsyeager
 
Posts: 2
Joined: Wed Nov 16, 2011 8:59 pm

Postby Brian Donahue » Mon Nov 21, 2011 4:20 pm

Same as profiling a web application. Only minimize the IE when it opens, as closing this will stop profiling. Get whatever consumes the webservice running and you should see results. Of course if you choose profile on unused port you have to change the contract on your service consumer to use the new port.

Good Luck!!
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Performance Profiler 6

Who is online

Users browsing this forum: No registered users and 0 guests