Skip to content

Commit

Permalink
Wrote some code to add logging when new servers are registered
Browse files Browse the repository at this point in the history
Affects issues:
- Possibly fixed #2254
  • Loading branch information
AuroraLS3 committed Feb 4, 2022
1 parent cea496c commit fa9870d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private Server registerNew() {

private Server registerNew(ServerUUID serverUUID) {
Server server = createServerObject(serverUUID);
logger.info("Registering a new server in database with UUID " + serverUUID);
fromDatabase.save(server);

Server stored = fromDatabase.load(serverUUID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public Optional<Server> load(ServerUUID serverUUID) {

@Override
public void save(Server server) {
if (server == null) return;
try {
dbSystem.getDatabase().executeTransaction(
new StoreServerInformationTransaction(server)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public ServerFileLoader(
}

public void prepare() throws IOException {
read();
try (ConfigReader reader = new ConfigReader(files.getResourceFromJar("DefaultServerInfoFile.yml").asInputStream())) {
copyMissing(reader.read());
}
Expand Down

0 comments on commit fa9870d

Please sign in to comment.