Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j question

 
Ken Liang
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It is known that we can use PropertyConfigurator.configureAndWatch("propertiesfile") to monitor the change of the property file. I want to catch the file change event then when it changes I can do some renew operation. I don't know if I need add a listener or create my own event? How? May someone kindly give me a smaple?
Appreciate for reply.
Ken
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the "Open Source Projects" forum
 
R Jelda
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have your own org.apache.log4j.spi.Configurator and do the stuff in doConfigure()..
easy way is, Have a MyOwnConfigurator which extends DOMConfigurator and
override doConfigure(URL url, LoggerRepository repository)..
And do the stuff whatever u want and call super.doConfigure(URL url, LoggerRepository repository)
Hope this could help u.
Regards,
Jelda
 
Ken Liang
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Jelda! I am trying.........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic