AW: Log Debug and Info in 2 different files

2009-02-16 Thread Bender Heri
I think it is not necessary to use Filters as Curt suggested since you dont 
want to have an upper limit of the levels. Add the threshold property to the 
appender declaration. 
Your problem is that you have defined two loggers with the same name. I assume 
that the second one overwrites the first one during configuration. Just declare 
one logger (without level property) and attach both appenders to it. BTW: You 
should also declare a root logger for all other log statements.

   


   

Heri 

-Ursprüngliche Nachricht-
Von: Mohit Anchlia [mailto:mohitanch...@gmail.com] 
Gesendet: Donnerstag, 12. Februar 2009 23:30
An: log4j-user@logging.apache.org
Betreff: [SPAM (Bayesain Analysis)] - Log Debug and Info in 2 different files - 
Bayesian Filter detected spam

I am trying to log DEBUG and up in one log file and INFO and up in other log 
file. But it doesn't seem to be working. I have tried various things like 
"Level", "Threshold", "additivity", "Priority"
etc. Nothing seems to be working. Nothing is being written to sw.log.
Only INFO and up is being written to sw_infoerr.log.

I just want DEBUG and up in sw.log and INFO and up in sw_infoerr.log

Below is the config:




http://jakarta.apache.org/log4j/";
debug="false">
   
  
  

  
  
  

  
  
 
  
   
   
  
  

  
  
  

  
  
 
  
   

   

   

   


   


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



AW: Log Debug and Info in 2 different files

2009-02-16 Thread Bender Heri
What is the problem? The below configuration seems OK, if you replace the "..." 
by the other needed parameters (file, layout, etc).
You can put debug="true" to see on the console how log4j configures itself.
Heri 

-Ursprüngliche Nachricht-
Von: Steve Cohen [mailto:sco...@javactivity.org] 
Gesendet: Montag, 16. Februar 2009 19:50
An: Log4J Users List
Betreff: [SPAM (Bayesain Analysis)] - Re: Log Debug and Info in 2 different 
files - Bayesian Filter detected spam

>> I just want DEBUG and up in sw.log and INFO and up in sw_infoerr.log

Why would this not work?




http://jakarta.apache.org/log4j/";
debug="false">
   
 ...
   
   


...
  

   


   




Mohit Anchlia wrote:
> I am trying to log DEBUG and up in one log file and INFO and up in 
> other log file. But it doesn't seem to be working. I have tried 
> various things like "Level", "Threshold", "additivity", "Priority"
> etc. Nothing seems to be working. Nothing is being written to sw.log.
> Only INFO and up is being written to sw_infoerr.log.
>
> I just want DEBUG and up in sw.log and INFO and up in sw_infoerr.log
>
> Below is the config:
>
>   SYSTEM "log4j.dtd">
>
> http://jakarta.apache.org/log4j/";
> debug="false">
>
>   
>   
>
>   
>   
>   
>
>   
>   
>  
>   
>
>
>   
>   
>
>   
>   
>   
>
>   
>   
>  
>   
>
>
>
>   
>
>
>
> 
>   
>
> 
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>
>
>   


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org