Prefix all (intentional) output properly.
This commit is contained in:
parent
70dead3fb9
commit
ccbd6bf45e
13 changed files with 60 additions and 48 deletions
|
|
@ -25,6 +25,7 @@ import org.json.simple.parser.ParseException;
|
|||
|
||||
class JsonTimerTask extends TimerTask {
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
protected static final String LOG_PREFIX = "[dynmap] ";
|
||||
|
||||
private final DynmapPlugin plugin;
|
||||
private Server server;
|
||||
|
|
@ -66,9 +67,9 @@ class JsonTimerTask extends TimerTask {
|
|||
jsonMsgs = (JSONArray) parser.parse(inputFileReader);
|
||||
inputFileReader.close();
|
||||
} catch (IOException ex) {
|
||||
log.log(Level.SEVERE, "Exception while reading JSON-file.", ex);
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception while reading JSON-file.", ex);
|
||||
} catch (ParseException ex) {
|
||||
log.log(Level.SEVERE, "Exception while parsing JSON-file.", ex);
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception while parsing JSON-file.", ex);
|
||||
}
|
||||
|
||||
if (jsonMsgs != null) {
|
||||
|
|
@ -120,9 +121,9 @@ class JsonTimerTask extends TimerTask {
|
|||
fos.write(Json.stringifyJson(update).getBytes());
|
||||
fos.close();
|
||||
} catch (FileNotFoundException ex) {
|
||||
log.log(Level.SEVERE, "Exception while writing JSON-file.", ex);
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception while writing JSON-file.", ex);
|
||||
} catch (IOException ioe) {
|
||||
log.log(Level.SEVERE, "Exception while writing JSON-file.", ioe);
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception while writing JSON-file.", ioe);
|
||||
}
|
||||
}
|
||||
lastTimestamp = System.currentTimeMillis();
|
||||
|
|
@ -166,9 +167,9 @@ class JsonTimerTask extends TimerTask {
|
|||
fos.write(Json.stringifyJson(regionData).getBytes());
|
||||
fos.close();
|
||||
} catch (FileNotFoundException ex) {
|
||||
log.log(Level.SEVERE, "Exception while writing JSON-file.", ex);
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception while writing JSON-file.", ex);
|
||||
} catch (IOException ioe) {
|
||||
log.log(Level.SEVERE, "Exception while writing JSON-file.", ioe);
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception while writing JSON-file.", ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue