Maarten,
That was it!
Calling appender.activateOptions(); did the trick.
Thanks SO much!
David.
Maarten Bosteels-4 wrote:
>
> I haven't tried it, but maybe it helps to call activateOptions()
>
> Like this:
>
> appender.setSubject(currEnv.toUpperCase()+": "+appender.getSubject());
> append
Have an application where the number of threads that get launched are
dynamic. Could be anywhere from 1 to 300 threads that could get launched at
runtime. I would like to know if it is possible to setup a file appender
for each thread and have the indiv threads write to their own file appender.
This was discussed a lot on this list. Search in archive, keywords: MDC,
RepositorySelector, different files.
We currently discuss on the developper list the introduction of a
MultiFileAppender which addresses just your need. But the work is still in
progress...
Heri
> -Original Message--
A stand-alone Java application could use
DOMConfigurator.configureAndWatch (but don't allow it to do automatic
configuration).
On 10/10/06, vincentw <[EMAIL PROTECTED]> wrote:
I'm don't quite understand the question. it's a java application.
James Stauffer wrote:
>
> In what kind of environm
That should be possible by writing your own appender. Search the
archives as this was discussed recently.
On 10/11/06, sudhakardvvn <[EMAIL PROTECTED]> wrote:
Have an application where the number of threads that get launched are
dynamic. Could be anywhere from 1 to 300 threads that could get
I see...no it's just a standalone Java application.
James is probably wondering whether your code is running in a web
container, such as Tomcat. In that case, LogWeb might be able to help
http://www.codeczar.com/products/logweb/
It works great for me!
Jake
--
View this message in con
I think that you could use something like:
PatternLayout pattern = new PatternLayout("your pattern");
String filename = ;
FileAppender threadAppender = new FileAppender(pattern, filename);
String threadLogName = ;
Logger threadLog = Logger.getLogger(threadLogName);
threadLog.setAdditivity(false)
Well, I use DOMConfigurator initially, but what about when the program is
running??
I would like to set a new root level or a log file size. Can I do something
like
Logger.getRootLogger.setLevel
or something like that? If I do it this way do I have to stop and restart
the logger?
James Sta
Yes, you can. Don't forget to call activateOptions() at the end of
reconfiguring. You need not to restart the app.
Heri
> -Original Message-
> From: vincentw [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 11, 2006 7:06 PM
> To: log4j-user@logging.apache.org
> Subject: [SPAM (Bayesai
Using configureAndWatch you can just change the file and it will
update based on the changes.
On 10/11/06, vincentw <[EMAIL PROTECTED]> wrote:
Well, I use DOMConfigurator initially, but what about when the program is
running??
I would like to set a new root level or a log file size. Can I do
What would I call activateOptions() with?
Bender Heri wrote:
>
> Yes, you can. Don't forget to call activateOptions() at the end of
> reconfiguring. You need not to restart the app.
> Heri
>
>
--
View this message in context:
http://www.nabble.com/Can-I-change-log4j-configuration-programat
I believe you call it on the appender after you change its settings.
On 10/11/06, vincentw <[EMAIL PROTECTED]> wrote:
What would I call activateOptions() with?
Bender Heri wrote:
>
> Yes, you can. Don't forget to call activateOptions() at the end of
> reconfiguring. You need not to restart th
12 matches
Mail list logo