I want to set up my log4j log path with a db param.
My log4j properties is this:
log4j.appender.file.File=${log.app.path}/app/app1.log
I populated the System property ${log.app.path} with a JVM var.
Now I would like to set that path with a value in database. Than I thought to set it with a ServletContextListener but I found that the log4j is aready running.
Any suggestions?
Thank you.
You can always initialize a logger with a FileAppender in the code. You can just use the value you want( from db or where ever) and set the params for FileAppender in to the Logger Object.