You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Bianca <bi...@hotmail.com> on 2004/01/13 15:27:12 UTC
Re:
List,
I'm working on a web application the uses a different
log file for each action. On the beginning of each
action the property file is configured to have that
behavior. The log4j do its job well until I start a
process in a thread mode from a link in the
application and do an action in the web application in
the same time.
E.g.:
When I start a process in thread mode, it uses the
"PropertyConfigurator.configure(String)" method to
configure a property file that has the path to the log
file for this process, for example logFile_01.txt, and
starts to write on the log file correctly. When I get
back to the web application and do an other action
like, insert, this one sets an other property file
that has a different log file for this action, using
the "PropertyConfigurator.configure(String)" method,
for example logFile_02.txt. From now on, I have a
problem: The process that is running in thread mode
writes the log on logFile_02.txt, instead of keeps
writing in the logFile_01.
It seems that the
"PropertyConfigurator.configure(String)" method
configures the property file for all logger objects.
How do I do to have the thread's logger object
configured to a different properties file from the web
application even if it configures the property file
some other time in the web application while running
the thread?
Thanks in advance.
Bianca Regato