wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes log4j  question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j  question" Watch "log4j  question" New topic
Author

log4j question

Ken Liang
Greenhorn

Joined: Jan 26, 2004
Posts: 7
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

Joined: Sep 29, 2000
Posts: 8521
Moved to the "Open Source Projects" forum


"JavaRanch, where the deer and the Certified play" - David O'Meara
R Jelda
Greenhorn

Joined: May 13, 2002
Posts: 26
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


"If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas." -George Bernard Shaw
Ken Liang
Greenhorn

Joined: Jan 26, 2004
Posts: 7
Thank you, Jelda! I am trying.........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j question
 
Similar Threads
Jatbbed pane event
Query
log4j question
Hibernate triggers
JSP directive attribute from expression