Cleans up message logging quite a bit
Adds methods to Stargate for easier logging and less redundancy Loads the language loader in two parts to make it available while loading Adds a translated string to the reload-message Uses String.format to make long messages more readable Makes it possible to get strings directly from the backup language to make debugging easier
This commit is contained in:
@ -10,7 +10,6 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* A gate describes the physical structure of a stargate
|
||||
@ -268,7 +267,7 @@ public class Gate {
|
||||
|
||||
bufferedWriter.close();
|
||||
} catch (IOException ex) {
|
||||
Stargate.getConsoleLogger().log(Level.SEVERE, "Could not save Gate " + filename + " - " + ex.getMessage());
|
||||
Stargate.logSevere(String.format("Could not save Gate %s - %s", filename, ex.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user