mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Logger.error
This commit is contained in:
parent
7133727edd
commit
867f367860
8 changed files with 15 additions and 16 deletions
|
@ -344,7 +344,7 @@ public void run() {
|
|||
try {
|
||||
close();
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
logger.error("LaunchServer close error", e);
|
||||
}
|
||||
}));
|
||||
CommonHelper.newThread("Command Thread", true, commandHandler).start();
|
||||
|
@ -361,8 +361,7 @@ public void run() {
|
|||
syncProfilesDir();
|
||||
modulesManager.invokeEvent(new LaunchServerProfilesSyncEvent(this));
|
||||
} catch (IOException e) {
|
||||
logger.error(e);
|
||||
logger.error("Updates/Profiles not synced");
|
||||
logger.error("Updates/Profiles not synced", e);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
@ -373,7 +372,7 @@ public void run() {
|
|||
modulesManager.invokeEvent(new LaunchServerFullInitEvent(this));
|
||||
logger.info("LaunchServer started");
|
||||
} catch (Throwable e) {
|
||||
logger.error(e);
|
||||
logger.error("LaunchServer startup failed",e);
|
||||
JVMHelper.RUNTIME.exit(-1);
|
||||
}
|
||||
}
|
||||
|
@ -419,7 +418,7 @@ public void restart() {
|
|||
try {
|
||||
builder.start();
|
||||
} catch (IOException e) {
|
||||
logger.error(e);
|
||||
logger.error("Restart failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ public void addPublicKeyToHardwareInfo(UserHardware hardware, byte[] publicKey)
|
|||
s.setLong(2, mySQLUserHardware.id);
|
||||
s.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
logger.error(e);
|
||||
logger.error("SQL error", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ public Iterable<User> getUsersByHardwareInfo(UserHardware hardware) {
|
|||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
logger.error(e);
|
||||
logger.error("SQL error", e);
|
||||
return null;
|
||||
}
|
||||
return users;
|
||||
|
@ -379,7 +379,7 @@ public void banHardware(UserHardware hardware) {
|
|||
s.setLong(2, mySQLUserHardware.id);
|
||||
s.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
logger.error(e);
|
||||
logger.error("SQL Error", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ public void unbanHardware(UserHardware hardware) {
|
|||
s.setLong(2, mySQLUserHardware.id);
|
||||
s.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
logger.error(e);
|
||||
logger.error("SQL error", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public Path process(Path inputFile) throws IOException {
|
|||
chain.add(certificate);
|
||||
signedDataGenerator = SignHelper.createSignedDataGenerator(server.keyAgreementManager.ecdsaPrivateKey, certificate, chain, "SHA256WITHECDSA");
|
||||
} catch (OperatorCreationException | CMSException | CertificateException e) {
|
||||
logger.error(e);
|
||||
logger.error("Certificate generate failed", e);
|
||||
}
|
||||
return inputFile;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ protected void postInitProps() {
|
|||
try {
|
||||
return e.getEncoded();
|
||||
} catch (CertificateEncodingException e2) {
|
||||
logger.error(e2);
|
||||
logger.error("Certificate encoding failed", e2);
|
||||
return new byte[0];
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
|
|
|
@ -41,7 +41,7 @@ public static CMSSignedDataGenerator gen(LaunchServerConfig.JarSignerConf config
|
|||
config.keyAlias, config.signAlgo, config.keyPass);
|
||||
} catch (CertificateEncodingException | UnrecoverableKeyException | KeyStoreException
|
||||
| OperatorCreationException | NoSuchAlgorithmException | CMSException e) {
|
||||
logger.error(e);
|
||||
logger.error("Create signedDataGenerator failed", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ protected Thread newThread(Runnable r, String name) {
|
|||
if (e.getMessage().contains("Connection reset by peer")) {
|
||||
return;
|
||||
}
|
||||
logger.error(e);
|
||||
logger.error("Netty exception", e);
|
||||
});
|
||||
return thread;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) {
|
|||
try {
|
||||
if (hooks.hook(ctx, frame)) return;
|
||||
} catch (Throwable ex) {
|
||||
logger.error(ex);
|
||||
logger.error("WebSocket frame handler hook error", ex);
|
||||
}
|
||||
if (frame instanceof TextWebSocketFrame) {
|
||||
try {
|
||||
|
@ -72,7 +72,7 @@ protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) {
|
|||
logger.warn("Client {} send invalid request. Connection force closed.", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("Client message: {}", ((TextWebSocketFrame) frame).text());
|
||||
logger.error(ex);
|
||||
logger.error("Process websockets request failed", ex);
|
||||
}
|
||||
ctx.channel().close();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public void execute(ChannelHandlerContext ctx, Client client) {
|
|||
sendError(e.getMessage());
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
logger.error("Join Server error", e);
|
||||
sendError("Internal authHandler error");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue