mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Added stub for old logger so plugins don't break.
This commit is contained in:
parent
ca5ca73a9d
commit
2bc4bc3473
@ -66,6 +66,7 @@ public final class Emulator {
|
|||||||
private static GameServer gameServer;
|
private static GameServer gameServer;
|
||||||
private static RCONServer rconServer;
|
private static RCONServer rconServer;
|
||||||
private static CameraClient cameraClient;
|
private static CameraClient cameraClient;
|
||||||
|
private static Logging logging;
|
||||||
private static Database database;
|
private static Database database;
|
||||||
private static DatabaseLogger databaseLogger;
|
private static DatabaseLogger databaseLogger;
|
||||||
private static ThreadPooling threading;
|
private static ThreadPooling threading;
|
||||||
@ -100,6 +101,7 @@ public final class Emulator {
|
|||||||
setBuild();
|
setBuild();
|
||||||
Emulator.stopped = false;
|
Emulator.stopped = false;
|
||||||
ConsoleCommand.load();
|
ConsoleCommand.load();
|
||||||
|
Emulator.logging = new Logging();
|
||||||
|
|
||||||
System.out.println(logo);
|
System.out.println(logo);
|
||||||
|
|
||||||
@ -319,6 +321,14 @@ public final class Emulator {
|
|||||||
return rconServer;
|
return rconServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static Logging getLogging() {
|
||||||
|
return logging;
|
||||||
|
}
|
||||||
|
|
||||||
public static ThreadPooling getThreading() {
|
public static ThreadPooling getThreading() {
|
||||||
return threading;
|
return threading;
|
||||||
}
|
}
|
||||||
|
97
src/main/java/com/eu/habbo/core/Logging.java
Normal file
97
src/main/java/com/eu/habbo/core/Logging.java
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
package com.eu.habbo.core;
|
||||||
|
|
||||||
|
import com.eu.habbo.Emulator;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
public class Logging {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger("LegacyLogger");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logStart(Object line) {
|
||||||
|
LOGGER.info("[LOADING] {}", line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logShutdownLine(Object line) {
|
||||||
|
LOGGER.info("[SHUTDOWN] {}", line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logUserLine(Object line) {
|
||||||
|
LOGGER.info("[USER] {}", line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logDebugLine(Object line) {
|
||||||
|
LOGGER.debug("[DEBUG] {}", line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logPacketLine(Object line) {
|
||||||
|
if (Emulator.getConfig().getBoolean("debug.show.packets")) {
|
||||||
|
LOGGER.debug("[PACKET] {}", line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logUndefinedPacketLine(Object line) {
|
||||||
|
if (Emulator.getConfig().getBoolean("debug.show.packets.undefined")) {
|
||||||
|
LOGGER.debug("[PACKET] [UNDEFINED] {}", line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logErrorLine(Object line) {
|
||||||
|
LOGGER.error("[ERROR] {}", line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logSQLException(SQLException e) {
|
||||||
|
LOGGER.error("[ERROR] SQLException", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void logPacketError(Object e) {
|
||||||
|
LOGGER.error("[ERROR] PacketError {}", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void handleException(Exception e) {
|
||||||
|
LOGGER.error("[ERROR] Exception", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user