2
我有一个使用XMLConfiguration
加载的配置文件(XML)。XMLConfiguration文件中的日志更改
我需要确保这个XMLConfiguration
实例更新(每30秒)。
对于这个问题,我有以下代码:
XMLConfiguration configuration = new XMLConfiguration(configFile);
configuration.setAutoSave(true);
FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy();
strategy.setRefreshDelay(getRefreshDelay());
configuration.setReloadingStrategy(strategy);
它的伟大工程,但事情是我要登录这个XML文件进行任何更改。
有没有办法呢?
请改善问题......你问的是如何登录,或者你问如何检查XML数据是否有变化?你想如何做日志记录,文本文件或什么? – hyde
感谢您的回复 - 至于您的问题: 我想将更改记录到日志文件。 我想记录的更改是xml文件中的更改。 我想我有一个答案 - 如果它是正确的,我会在几秒内发布它 – Noam