Vladimir Bodurov | 18 Aug 21:14

Can I limit the level for appender

Hello,
 
Can I limit the level for appender, for example if I want the errors to go to database and the debug calls to Debug Output.
 
Is this possible?
 
Thank you in advance
 
Vlad

Re: Can I limit the level for appender

You could use two appenders with the same logger, each one with a LevelMatchFilter, so one appender writes to the database and the other writes to the console.

-fred

On Mon, Aug 18, 2008 at 2:47 PM, Vladimir Bodurov <vladimir.bodurov <at> gmail.com> wrote:
Hello,
 
Can I limit the level for appender, for example if I want the errors to go to database and the debug calls to Debug Output.
 
Is this possible?
 
Thank you in advance
 
Vlad

Vladimir Bodurov | 18 Aug 22:50

Re: Can I limit the level for appender

Thank you Frend,
 
I also found that

<

param name="Threshold" value="WARN" />
for appender works good as well.
 
Vlad

On Mon, Aug 18, 2008 at 12:22 PM, Freddy Gómez <gcfreddy <at> gmail.com> wrote:
You could use two appenders with the same logger, each one with a LevelMatchFilter, so one appender writes to the database and the other writes to the console.

-fred


On Mon, Aug 18, 2008 at 2:47 PM, Vladimir Bodurov <vladimir.bodurov <at> gmail.com> wrote:
Hello,
 
Can I limit the level for appender, for example if I want the errors to go to database and the debug calls to Debug Output.
 
Is this possible?
 
Thank you in advance
 
Vlad


Re: Can I limit the level for appender

good, just be aware that one of your appender will get error calls as well as debug calls.

On Mon, Aug 18, 2008 at 4:20 PM, Vladimir Bodurov <vladimir.bodurov <at> gmail.com> wrote:
Thank you Frend,
 
I also found that

<

param name="Threshold" value="WARN" />
for appender works good as well.
 
Vlad

On Mon, Aug 18, 2008 at 12:22 PM, Freddy Gómez <gcfreddy <at> gmail.com> wrote:
You could use two appenders with the same logger, each one with a LevelMatchFilter, so one appender writes to the database and the other writes to the console.

-fred


On Mon, Aug 18, 2008 at 2:47 PM, Vladimir Bodurov <vladimir.bodurov <at> gmail.com> wrote:
Hello,
 
Can I limit the level for appender, for example if I want the errors to go to database and the debug calls to Debug Output.
 
Is this possible?
 
Thank you in advance
 
Vlad



Vladimir Bodurov | 18 Aug 23:11

Re: Can I limit the level for appender

Yes, thank you, I am aware about that, I just want to keep only errors in the database and everything in the debug stream.

On Mon, Aug 18, 2008 at 2:01 PM, Freddy Gómez <gcfreddy <at> gmail.com> wrote:
good, just be aware that one of your appender will get error calls as well as debug calls.


On Mon, Aug 18, 2008 at 4:20 PM, Vladimir Bodurov <vladimir.bodurov <at> gmail.com> wrote:
Thank you Frend,
 
I also found that

<

param name="Threshold" value="WARN" />
for appender works good as well.
 
Vlad

On Mon, Aug 18, 2008 at 12:22 PM, Freddy Gómez <gcfreddy <at> gmail.com> wrote:
You could use two appenders with the same logger, each one with a LevelMatchFilter, so one appender writes to the database and the other writes to the console.

-fred


On Mon, Aug 18, 2008 at 2:47 PM, Vladimir Bodurov <vladimir.bodurov <at> gmail.com> wrote:
Hello,
 
Can I limit the level for appender, for example if I want the errors to go to database and the debug calls to Debug Output.
 
Is this possible?
 
Thank you in advance
 
Vlad




Graham Walsh | 20 Aug 12:38

domains and log4net

Hi,

 

This is driving me CRAZY! :( I'm doing something I see others a trying to do (via google) however I simply cannot get it to work.

 

I have a GUI app that uses a rollingFileAppender (it also uses a RichTextBox appender but  for the moment, I just want the file appender to work ok). Anyways, I create my Domain and point everything to the "previousVersion" directory where all the dlls are located for the new Domain. I successfully call my methods in the new domain.

 

AppDomain

newDomain = AppDomain.CreateDomain("NewDomain", null, "previousVersion", ".", false, null, null);

 

I make calls using this newDomain and everything works fine. I cannot however get the logger to log to the parent domains logfile. i.e. both domains should log to toto.log but they don't. The new domain logs nothing. I can't even get the new domain to log to a separate logfile, so I know I'm doing something dumb

 

I have tried adding

 

<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />

<lockingModel type="log4net.Appender.RichTextBoxAppender+MinimalLock" />

to my appenders but without any luck. I am sure I'm doing something really stupid here but I just can't see what.  the log4net config file is correctly locatedd in the new domains working directory and permissions are fine. Is there a way to debug log4net to see what I'm doing wrong?

 

thanks much for any help

G

 

 
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.                                                                

Gmane