Log4J configuration

S

Sash

Hi, I was wondering if this is possible. I would like to configure an
appender in log4.properties by using a variable. To be more precise,
is there a variable that can be used which is initilized to the path
of a webapp, so that I could do something like the following:
....
log4j.appender.WK.File=$webappcontext/logs/log.txt
....

Any help is greatly appreciated!
 
K

Kathy Benson

I don't think you can do that from config file, but you can dynamically
create an appender object within Java code.

KB
Hi, I was wondering if this is possible. I would like to configure an
appender in log4.properties by using a variable. To be more precise,
is there a variable that can be used which is initilized to the path
of a webapp, so that I could do something like the following:
...
log4j.appender.WK.File=$webappcontext/logs/log.txt
...

Any help is greatly appreciated!

--
------------------------------------------------------------------------
This email is certified to be Spam free by Spam Marshall

You don't pay to get spam, why pay to clean it?
Visit http://www.spammarshall.com to create an account for free
<http://www.spammarshall.com>

------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top