public LogFileOutput load(String key) throws Exception {
if(configurationService.isConfigurationSet("logging.file."+key+".name")) {
return new LogFileOutput(key, configurationService);
} else {
throw new MarmottaConfigurationException("logfile configuration "+key+" not found");
}
}
}
);
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");
}
}
}
);