summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/build.gradle1
-rw-r--r--core/src/main/java/kz/ilotterytea/frogartha/sessions/IdentityClient.java5
-rw-r--r--core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionClient.java11
-rw-r--r--core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionHandlers.java7
4 files changed, 10 insertions, 14 deletions
diff --git a/core/build.gradle b/core/build.gradle
index a731b5d..18766c3 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -4,7 +4,6 @@ eclipse.project.name = appName + '-core'
dependencies {
api "com.github.mgsx-dev.gdx-gltf:gltf:$gdxGltfVersion"
api "com.github.MrStahlfelge.gdx-websockets:core:$gdxWsVersion"
- api "ch.qos.logback:logback-classic:$logbackVersion"
api project(':shared')
if (enableGraalNative == 'true') {
diff --git a/core/src/main/java/kz/ilotterytea/frogartha/sessions/IdentityClient.java b/core/src/main/java/kz/ilotterytea/frogartha/sessions/IdentityClient.java
index aa8389b..1e09e8e 100644
--- a/core/src/main/java/kz/ilotterytea/frogartha/sessions/IdentityClient.java
+++ b/core/src/main/java/kz/ilotterytea/frogartha/sessions/IdentityClient.java
@@ -1,8 +1,7 @@
package kz.ilotterytea.frogartha.sessions;
import kz.ilotterytea.frogartha.FrogarthaGame;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import kz.ilotterytea.frogartha.utils.Logger;
public class IdentityClient {
private final Logger log;
@@ -12,7 +11,7 @@ public class IdentityClient {
private boolean isProcessing, isAuthorized;
public IdentityClient() {
- this.log = LoggerFactory.getLogger(IdentityClient.class);
+ this.log = new Logger(IdentityClient.class);
this.game = FrogarthaGame.getInstance();
this.username = null;
diff --git a/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionClient.java b/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionClient.java
index 67afd69..0e097a7 100644
--- a/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionClient.java
+++ b/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionClient.java
@@ -9,9 +9,8 @@ import kz.ilotterytea.frogartha.FrogarthaGame;
import kz.ilotterytea.frogartha.domain.Identity;
import kz.ilotterytea.frogartha.domain.server.Acknowledge;
import kz.ilotterytea.frogartha.exceptions.PlayerKickException;
+import kz.ilotterytea.frogartha.utils.Logger;
import kz.ilotterytea.frogartha.utils.SerializerUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class SessionClient implements WebSocketListener {
private final Logger log;
@@ -27,20 +26,20 @@ public class SessionClient implements WebSocketListener {
SerializerUtils.registerTypes(serializer);
connection.setSerializer(serializer);
- this.log = LoggerFactory.getLogger(SessionClient.class);
+ this.log = new Logger(SessionClient.class);
this.game = FrogarthaGame.getInstance();
}
@Override
public boolean onOpen(WebSocket webSocket) {
- log.info("Connected");
+ log.log("Connected");
updateIdentity();
return true;
}
@Override
public boolean onClose(WebSocket webSocket, int closeCode, String reason) {
- log.info("Connection closed! Reason: {} {}", closeCode, reason);
+ log.log("Connection closed! Reason: {} {}", closeCode, reason);
game.getIdentityClient().setAuthorized(false);
return true;
}
@@ -62,7 +61,7 @@ public class SessionClient implements WebSocketListener {
if (obj instanceof Acknowledge) SessionHandlers.handleAcknowledge((Acknowledge) obj);
else if (obj instanceof PlayerKickException) throw (PlayerKickException) obj;
} catch (PlayerKickException e) {
- log.info("Kicked out: {}", e.getMessage());
+ log.log("Kicked out: {}", e.getMessage());
} catch (Exception e) {
log.error("An exception was thrown while processing message", e);
}
diff --git a/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionHandlers.java b/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionHandlers.java
index cb6457d..383640b 100644
--- a/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionHandlers.java
+++ b/core/src/main/java/kz/ilotterytea/frogartha/sessions/SessionHandlers.java
@@ -2,16 +2,15 @@ package kz.ilotterytea.frogartha.sessions;
import kz.ilotterytea.frogartha.FrogarthaGame;
import kz.ilotterytea.frogartha.domain.server.Acknowledge;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import kz.ilotterytea.frogartha.utils.Logger;
public class SessionHandlers {
- private static final Logger log = LoggerFactory.getLogger(SessionHandlers.class);
+ private static final Logger log = new Logger(SessionHandlers.class);
private static final FrogarthaGame game = FrogarthaGame.getInstance();
private static final SessionClient client = game.getSessionClient();
public static void handleAcknowledge(Acknowledge acknowledge) {
- log.info("The server was acknowledged: {}", acknowledge);
+ log.log("The server was acknowledged: {}", acknowledge);
if (acknowledge.getCode() == Acknowledge.AcknowledgeCode.IDENTIFIED) {
game.getIdentityClient().setAuthorized(true);