logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Bourouba <kar...@hotmail.com>
Subject RE: Error while starting second instance of application
Date Mon, 22 Nov 2010 13:30:12 GMT
Hi, 

 

Do you think maybe that you should only use one instance of your
application? Or try and generate a random named file that feeds a general
log file on exit?

 

You are probably getting this as you are specifying the same filename for
each instance in either your code or you .config. Have a think about what it
is you are actually trying to do right now.

 

K

From: vikas manghani [mailto:vikas.manghani@datamatics.com] 
Sent: 22 November 2010 13:14
To: log4net-user@logging.apache.org
Subject: Error while starting second instance of application

 

Hi

I am using log4net in my Windows CE application.

I am getting the following error when I try to run a second instance of my
application on the device:

"Unable to acquire lock on file <File Path>. The process cannot access the
file <File Path> because it is being used by another process".

 

Its clear that log4net is unable to lock the log files when the second
instance is started. The problem is that, this opens up in a notepad window
and then stays there till the second instance ends. I want to prevent this
error from being displayed to the user as I am showing an informational
message to indicate that only one instance of the application can be
started.

Kindly let me know what can be done here to prevent the log4net error
popping up in Notepad.

 

Thanks and regards
Vikas Manghani

 

 



Disclaimer: The information contained in this e-mail and attachments if any
are privileged and confidential and are intended for the individual(s) or
entity(ies) named in this e-mail. If the reader or recipient is not the
intended recipient, or employee or agent responsible for delivering to the
intended recipient, you are hereby notified that dissemination, distribution
or copying of this communication or attachments thereof is strictly
prohibited. IF YOU RECEIVE this communication in error, please immediately
notify the sender and return the original message. 




 


Mime
View raw message