Added date format for log in config.

This commit is contained in:
CodeForFame 2011-06-21 19:06:34 -05:00
parent 3ca4aa75f0
commit 23f1500287
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@ public class Config {
public static int IP_BAN_REMOVAL_DELAY;
public static int GARBAGE_COLLECT_INTERVAL;
public static int SAVE_INTERVAL;
public static String DATE_FORMAT;
static {
loadEnv();
@ -87,6 +88,8 @@ public class Config {
GARBAGE_COLLECT_INTERVAL = Integer.parseInt(props.getProperty("garbage-collect-interval"));
SAVE_INTERVAL = Integer.parseInt(props.getProperty("save-interval"));
DATE_FORMAT = props.getProperty("date-format");
props.clear();
Constants.GameServer.MOTD = "@yel@Welcome to @whi@" + Config.SERVER_NAME + "@yel@ - World @whi@" + (Config.SERVER_NUM == 0 ? 2 : Config.SERVER_NUM) + " (" + (Config.members ? "P2P" : "F2P") + ")";

View File

@ -3,6 +3,7 @@ package org.moparscape.msc.gs.util;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.moparscape.msc.config.Config;
import org.moparscape.msc.gs.Instance;
import org.moparscape.msc.gs.model.World;
@ -16,7 +17,7 @@ public class Logger {
* Simple date formatter to keep a date on outputs
*/
private static SimpleDateFormat formatter = new SimpleDateFormat(
"yyyy.MM.dd HH:mm:ss");
Config.DATE_FORMAT);
public static void connection(Object o) {
// Logging.debug(o.toString());