logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bianca" <bianc...@hotmail.com>
Subject Re:
Date Tue, 13 Jan 2004 14:27:12 GMT


  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. 


  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

View raw message