Yah, this is exactly what I wanted to do.  

However I'm not sure this is possible because of session.getLog();

Anyhow, it's no big deal.
I'll just put custom 
static Log log = LogFactory.getLogger(TheClassImIn.class)
in the files for which I want logging.


If in a later design you have the choice of not doing the session.getLog(), 
perhaps it would be the better choice?
(or there is still a chance I am completely missing the boat here)

-tim


On Jul 13, 2012, at 3:13 PM, Ioan Eugen Stan wrote:

> Hi,
> 
> Not sure is off-topic but maybe this could help a bit:
> 
> - 
> http://stackoverflow.com/questions/2763740/log4j-log-output-of-a-specific-class-to-a-specific-appender
> - 
> http://stackoverflow.com/questions/1460740/log4j-for-per-class-how-is-precedence-determined
> 
> Good luck,
> 
> 2012/7/13 timprepscius <[email protected]>:
>> So I'm running into a set of problems while trying to manipulate the apache 
>> james logs.
>> 
>> 
>> I'm not sure if I'm approaching the solution incorrectly or whether the way 
>> you're passing around the session log is going to make things pretty 
>> difficult.
>> 
>> 
>> Basically I need to shut off some logs, and keep others on.
>> But I'm finding that I basically have on/off for entire services.
>> 
>> 
>> So you know how there are logs for SMTP:
>> 
>> StringBuilder infoBuffer = new StringBuilder(256).append("Successfully 
>> spooled mail ").append(mail.getName()).append(" fro
>> I need to turn off all logs which have identifying information.
>> But.  I want to keep some, like for instance, connection from ip.
>> 
>> In the future I want to turn these off as well, but I need to know something 
>> of what is happening :-)
>> 
>> 
>> 
>> How I was thinking I would do this, is lookup which classes the logs were 
>> originating from and then scuttle those classes via log4j.
>> But it seems with the session log being passed around this becomes 
>> impossible?
>> 
>> 
>> So I'm going to have to turn the log4j everything to FATAL
>> and then go in and change the code for all the logs I actually want.
>> 
>> 
>> 
>> 
>> Or am I missing something here :-)
>> 
>> I probably am.
>> I hope I am actually.
>> I was hoping to keep the code changes to a bare minimum.
>> 
>> 
>> -tim
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 
> 
> 
> -- 
> Ioan Eugen Stan / CTO / http://axemblr.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to