473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Log4Net From 2 Process

Ram
Hey,
I'm using the Log4Net opensource object to write to my logs.
I'v written a wrapper ClassLibrary project for the Log4Net and all my
projects reference only to it.
I'v got a web application thats calls a com+ application (- another
project of mine that is in the same solution) and I want both of this
"layers" to use my Log4Net Wrapper, and - here comes the tricky part -
write to the same Log file.
When the Com+ application is set to work as Library, all is well, but
when the Com+ is set to run as "server", when I try to write to the
log from the Com+ (AFTER already writing throw the ASP_Net) I get an
exception from the log4net saying: "The Process Cant Access The File
<the log file> Because It Is Being Used By Another Process"
Nov 18 '05 #1
1 2034
pi***********@y ahoo.com (Ram) wrote in message news:<1c******* *************** ****@posting.go ogle.com>...
Hey,
I'm using the Log4Net opensource object to write to my logs.
I'v written a wrapper ClassLibrary project for the Log4Net and all my
projects reference only to it.
I'v got a web application thats calls a com+ application (- another
project of mine that is in the same solution) and I want both of this
"layers" to use my Log4Net Wrapper, and - here comes the tricky part -
write to the same Log file.
When the Com+ application is set to work as Library, all is well, but
when the Com+ is set to run as "server", when I try to write to the
log from the Com+ (AFTER already writing throw the ASP_Net) I get an
exception from the log4net saying: "The Process Cant Access The File
<the log file> Because It Is Being Used By Another Process"


FileAppender requires a write lock on the log file. The FAQ gives a
workaround, although your performance will probably suffer if you use
it:

"You may have each process log to a RemotingAppende r. The receiving
RemoteLoggingSe rverPlugin (or IRemoteLoggingS ink) can receive all the
events and send them to a single log file."
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6261
by: Alpha Zero | last post by:
how to configure log4net programmatically? I just want to modify some of the properties,which are read from configuration file, programatically. Regards,
0
1495
by: Ravindra.H | last post by:
Hi, We are trying to evaluate use log4net v1.1.1. When we try to execute the sample application "TestApp" that is provided with the actual source code, we get the following errors: log4net:ERROR No appenders could be found for category (testApp.LoggingExample). log4net:ERROR Please initialize the log4net system properly.
1
1580
by: Bob | last post by:
The raging question that is going on currently is about log4net vs. EIF. I feel that EIF is complex and incomplete at this point. By incomplete, I mean MS is still fiddling with it. log4net is based on log4j which has been around longer and is less complex. Other than WMI, log4net accomplishes the same tasks. The question is, can you do...
4
2198
by: Gawel | last post by:
hajo, can someone send me an example how to use above pattern in asp.net applicaiton? I can not figure out how to do it. I get no exceptions, simply no logging occures. Thanks for any info Gawel
2
2091
by: Marc Scheuner | last post by:
Folks, I'd really like to use log4net for our error logging, but I'm having two problems: 1) For certain cases, I'd like to log error and messages to text files. I tried both the regular FileAppender, as well as the RollingFileAppender, but both don't work exactly the way I'd like them to.
1
5161
by: chidam.chidam | last post by:
Hi all, I would like to implement log4net for logging my application. First let me describe in short about the application. I have a solution with two exe file outputs and several dll assemblies. And my application has a different AppDomain as it is a customization of another COM based application written in VB.NET. I have tried with...
2
6260
by: =?Utf-8?B?TWFyaw==?= | last post by:
Just curious - do people work with log4net with assemblies they put in the GAC? Without a fully qualified path, where would an assembly in the GAC be looking? e.g. indicates where to find the log4net config; usually this would be colocated with the app. When you put the assembly in the GAC, what is the relative location then? Is the...
2
1749
by: harish.c27 | last post by:
HI All, Here is my problem: log4net works fine with my Client (Windows Application .Net 1.1) but does not log any thing when i use it in my server (Com+ DLLs). Does any one know why or how to make it work. Thanks in Advance Harish
0
1474
by: rosshinkley | last post by:
Greetings. I know that log4net supports filtering based on properties (log4net.Filter.PropertyFilter). Trouble is, I'm having trouble spotting what valid property names are. Are they intrinsic to log4net or are they defined by the appender/logger itself? I would like to filter on a method name, for example, instead of the message...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.