[FIX] Logger и ServerWrapper или e.printStackTrace вместо нормального логгирования.

This commit is contained in:
zaxar163 2019-01-17 19:01:07 +03:00
parent 6aaf20c1d3
commit 851dcf52fe
No known key found for this signature in database
GPG key ID: E3B309DD3852DE06
2 changed files with 5 additions and 7 deletions

View file

@ -63,16 +63,16 @@ public static void premain(String agentArgument, Instrumentation instrumentation
Object[] args = {agentArgument, instrumentation};
mainMethod.invoke(args);
} catch (Throwable e) {
e.printStackTrace();
LogHelper.error(e);
}
}
}
public static void loadLibraries(Path dir) {
try {
Files.walkFileTree(dir, Collections.singleton(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new StarterVisitor());
IOHelper.walk(dir, new StarterVisitor(), true);
} catch (IOException e) {
e.printStackTrace(System.err);
LogHelper.error(e);
}
}
}

View file

@ -77,6 +77,8 @@ public static boolean loopAuth(ServerWrapper wrapper, int count, int sleeptime)
try {
Thread.sleep(sleeptime);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
LogHelper.error(e);
return false;
}
}
@ -179,10 +181,6 @@ private static void generateConfigIfNotExists() throws IOException {
newConfig.reconnectCount = 10;
newConfig.reconnectSleep = 1000;
newConfig.env = LauncherConfig.LauncherEnvironment.STD;
//try(Reader reader = IOHelper.newReader(IOHelper.getResourceURL("ru/gravit/launcher/server/ServerWrapper.cfg")))
//{
// newConfig = gson.fromJson(reader,Config.class);
//}
LogHelper.warning("Title is not set. Please show ServerWrapper.cfg");