* Startup: Log clients.config problems

This commit is contained in:
zzz
2009-07-04 16:35:36 +00:00
parent 5eec098e2b
commit ca14002bd1
2 changed files with 9 additions and 2 deletions

View File

@ -47,13 +47,15 @@ public class ClientAppConfig {
cfgFile = new File(ctx.getConfigDir(), clientConfigFile);
// fall back to use router.config's clientApp.* lines
if (!cfgFile.exists())
if (!cfgFile.exists()) {
System.out.println("Warning - No client config file " + cfgFile.getAbsolutePath());
return ctx.router().getConfigMap();
}
try {
DataHelper.loadProps(rv, cfgFile);
} catch (IOException ioe) {
// _log.warn("Error loading the client app properties from " + cfgFile.getName(), ioe);
System.out.println("Error loading the client app properties from " + cfgFile.getAbsolutePath() + ' ' + ioe);
}
return rv;

View File

@ -29,6 +29,11 @@ public class LoadClientAppsJob extends JobImpl {
_loaded = true;
}
List apps = ClientAppConfig.getClientApps(getContext());
if (apps.size() <= 0) {
_log.error("Warning - No client apps or router console configured - we are just a router");
System.err.println("Warning - No client apps or router console configured - we are just a router");
return;
}
for(int i = 0; i < apps.size(); i++) {
ClientAppConfig app = (ClientAppConfig) apps.get(i);
if (app.disabled)