logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: logger and app domains
Date Sun, 21 Sep 2008 17:51:48 GMT
My first thought would be to use .NET Remoting with named pipes. Did you try that?

----- Original Message ----
From: Peter Drier <peter.drier@gmail.com>
To: Log4NET User <log4net-user@logging.apache.org>
Sent: Saturday, September 20, 2008 1:57:11 PM
Subject: Re: logger and app domains

We're using log4net in an multi app domain application..  Lets say it was tricky..   Not sure
if this would solve your problem, but this is what we did:

1.  In the root app domain, we setup log4net as normal..  And added a custom Plugin that we
wrote to the l4n interface that was accessible to our child domains.
1..  In each child app domain, we setup l4n with a single custom appender that knew how to
find the plugin from #1 and forward all events to it, after a few checks to ensure that exceptions
were serializable.  

So now anything logged in the child domain was sent to the parent, to follow the config rules
and get logged out as necessary.  


Peter's Photography

2008/9/18 Graham Walsh <graham.walsh-prestataire@calyon.com>

I have an issue with 
a GUI app I'm running. I make calls across dll's as expected and my logging 
works fine. I have a richTextappender in place thats used by the GUI. As logging 
is done I see it in the richText box of my gui. We'll call this "normal" 
Now as part of our 
testing, I create an appDomain and make the method calls just as does the 
"normal" execution. I want this new appdomain to log to the same 
richTextBox however its not. In an attempt to take another approach, I tried to 
get the ILog object from the "Normal" execution and set it in the newly created 
AppDomain. This cant be done as;
- System.Runtime.Serialization.SerializationException:Type 'log4net.Core.LogImpl' in Assembly
Version=, Culture=neutral, PublicKeyToken=1b44e1d426115821' is not 
marked as serializable. 
I'm stuck. Anybody know how I can work around this issue? 
thanks much
Ce message et ses pièces jointes (le "message") est destiné à l'usage
exclusif de son destinataire.
Si vous recevez ce message par erreur, merci d'en aviser immédiatement
l'expéditeur  et de le détruire ensuite. Le présent message  pouvant
être altéré à notre insu,  CALYON Crédit Agricole CIB
ne peut pas être engagé par son contenu. Tous droits réservés.

This message and/or any  attachments (the "message") is intended for
the sole use of its addressee.
If you are not the addressee, please immediately notify the sender and
then destroy the message.  As this message and/or any attachments may
have been altered without our knowledge,  its content  is not legally
binding on CALYON Crédit Agricole CIB. All rights reserved.
View raw message