I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit ca14002b authored by zzz's avatar zzz
Browse files

* Startup: Log clients.config problems

parent 5eec098e
No related branches found
No related tags found
No related merge requests found
...@@ -47,13 +47,15 @@ public class ClientAppConfig { ...@@ -47,13 +47,15 @@ public class ClientAppConfig {
cfgFile = new File(ctx.getConfigDir(), clientConfigFile); cfgFile = new File(ctx.getConfigDir(), clientConfigFile);
// fall back to use router.config's clientApp.* lines // 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(); return ctx.router().getConfigMap();
}
try { try {
DataHelper.loadProps(rv, cfgFile); DataHelper.loadProps(rv, cfgFile);
} catch (IOException ioe) { } 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; return rv;
......
...@@ -29,6 +29,11 @@ public class LoadClientAppsJob extends JobImpl { ...@@ -29,6 +29,11 @@ public class LoadClientAppsJob extends JobImpl {
_loaded = true; _loaded = true;
} }
List apps = ClientAppConfig.getClientApps(getContext()); 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++) { for(int i = 0; i < apps.size(); i++) {
ClientAppConfig app = (ClientAppConfig) apps.get(i); ClientAppConfig app = (ClientAppConfig) apps.get(i);
if (app.disabled) if (app.disabled)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment