syslogCache = CacheBuilder.newBuilder().maximumSize(5).expireAfterAccess(10, TimeUnit.MINUTES).build(
new CacheLoader<String, SyslogOutput>() {
@Override
public SyslogOutput load(String key) throws Exception {
if(configurationService.isConfigurationSet("logging.syslog."+key+".name")) {
return new SyslogOutput(key, configurationService);
} else {
throw new MarmottaConfigurationException("syslog configuration "+key+" not found");
}
}
}