本文整理了Java中org.apache.logging.log4j.core.config.Configuration.getWatchManager()
方法的一些代码示例,展示了Configuration.getWatchManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getWatchManager()
方法的具体详情如下:
包路径:org.apache.logging.log4j.core.config.Configuration
类名称:Configuration
方法名:getWatchManager
[英]Return the WatchManager.
[中]返回WatchManager。
代码示例来源:origin: org.apache.logging.log4j/log4j-core
TimeUnit.SECONDS.sleep(config.getWatchManager().getIntervalSeconds()+1);
for (int i = 0; i < 17; ++i) {
logger.debug("Test message " + i);
代码示例来源:origin: mulesoft/mule
private void configureMonitor(MuleLoggerContext context) {
Configuration configuration = context.getConfiguration();
File configFile = null;
if (context.getConfigFile() != null) {
configFile = new File(context.getConfigFile().getPath());
} else if (!StringUtils.isEmpty(configuration.getName())) {
configFile = new File(configuration.getName());
}
if (configFile != null && configuration instanceof Reconfigurable) {
configuration.getWatchManager().setIntervalSeconds(DEFAULT_MONITOR_INTERVAL_SECS);
FileWatcher watcher = new ConfiguratonFileWatcher((Reconfigurable) configuration, getListeners(configuration));
configuration.getWatchManager().watchFile(configFile, watcher);
}
}
代码示例来源:origin: org.mule.runtime/mule-module-launcher
private void configureMonitor(MuleLoggerContext context) {
Configuration configuration = context.getConfiguration();
File configFile = null;
if (context.getConfigFile() != null) {
configFile = new File(context.getConfigFile().getPath());
} else if (!StringUtils.isEmpty(configuration.getName())) {
configFile = new File(configuration.getName());
}
if (configFile != null && configuration instanceof Reconfigurable) {
configuration.getWatchManager().setIntervalSeconds(DEFAULT_MONITOR_INTERVAL_SECS);
FileWatcher watcher = new ConfiguratonFileWatcher((Reconfigurable) configuration, getListeners(configuration));
configuration.getWatchManager().watchFile(configFile, watcher);
}
}
代码示例来源:origin: org.mule.modules/mule-module-launcher
private void configureMonitor(MuleLoggerContext context)
{
Configuration configuration = context.getConfiguration();
File configFile = null;
if (context.getConfigFile() != null)
{
configFile = new File(context.getConfigFile().getPath());
}
else if (!StringUtils.isEmpty(configuration.getName()))
{
configFile = new File(configuration.getName());
}
if (configFile != null && configuration instanceof Reconfigurable)
{
configuration.getWatchManager().setIntervalSeconds(DEFAULT_MONITOR_INTERVAL_SECS);
FileWatcher watcher = new ConfiguratonFileWatcher((Reconfigurable) configuration, getListeners(configuration));
configuration.getWatchManager().watchFile(configFile, watcher);
}
}
内容来源于网络,如有侵权,请联系作者删除!