You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Satrasala, Sudhakar" <Su...@adp.com> on 2003/07/29 20:03:17 UTC

log4j issue

Hi,
 
I get an error message when trying to log. I don't have a console appender
entry in my configuration file. Still,. My configurator code looks like:
 
URL url = LoggingConfigurator.class.getResource("/log.xml");
DOMConfigurator.configure(url.getFile());
 
I keep getting this error everytime.
        
log4j:ERROR Attempted to append to closed appender named [console]
 
Sudhakar
 

Setting multiple log threshold in multi-threaded environment

Posted by Shachindra Agarwal <sh...@metallect.com>.
Hello:

I am a new user of log4j. I am trying to use it in a multi-user,
multi-threaded environment. In this environment, each thread performs
operations on behalf of a unique user. Each user may have different log
threshold levels. For example, we may want to log only FATAL messages = for
user 'joe', whereas we may wish to log ALL messages for user 'pete'.

As per the recommendations, I have created a static logger instance across
all the threads. However, I can now only set a single log threshold level
across all the threads. I realize I can simulate multiple log threshold
levels (one per thread - for each user) by using MDC, but that is expensive.

Am I missing anything? Should I be creating one logger object per thread?

Thanks for your input.

-- Shachin.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org