473,382 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 2019
pi***********@yahoo.com (Ram) wrote in message news:<1c**************************@posting.google. 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 RemotingAppender. The receiving
RemoteLoggingServerPlugin (or IRemoteLoggingSink) 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
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
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: ...
1
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...
4
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 ...
2
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...
1
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....
2
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...
2
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.