[FIX] Logger.error

This commit is contained in:
Gravit 2021-06-20 10:42:13 +07:00
parent 7133727edd
commit 867f367860
No known key found for this signature in database
GPG key ID: 98A079490768CCE5
8 changed files with 15 additions and 16 deletions

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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());

View file

@ -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;
}
}

View file

@ -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;
}

View file

@ -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();
}

View file

@ -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;
}