mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
Simplified command logging
This commit is contained in:
@@ -21,15 +21,7 @@ public class Main {
|
|||||||
server.setBackend(Server.ServerBackend.REMOTE);
|
server.setBackend(Server.ServerBackend.REMOTE);
|
||||||
|
|
||||||
GlobalEventBus.subscribeAndRegister(Events.ServerEvents.OnCommand.class, e -> {
|
GlobalEventBus.subscribeAndRegister(Events.ServerEvents.OnCommand.class, e -> {
|
||||||
if (e.command() == Server.Command.LOGIN) {
|
logger.info("Command sent to server: {} with args: {}", e.command(), e.args());
|
||||||
logger.info("LOGIN command -> {}", String.join(" ", e.args()));
|
|
||||||
}
|
|
||||||
else if (e.command() == Server.Command.HELP) {
|
|
||||||
logger.info("HELP command -> {}", String.join(" ", e.args()));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logger.info(e.command().toString());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
GlobalEventBus.post(new Events.ServerEvents.command(Server.Command.HELP, "test", "test2"));
|
GlobalEventBus.post(new Events.ServerEvents.command(Server.Command.HELP, "test", "test2"));
|
||||||
|
|||||||
Reference in New Issue
Block a user