Added date format for log in config.
This commit is contained in:
parent
3ca4aa75f0
commit
23f1500287
|
@ -34,6 +34,7 @@ public class Config {
|
||||||
public static int IP_BAN_REMOVAL_DELAY;
|
public static int IP_BAN_REMOVAL_DELAY;
|
||||||
public static int GARBAGE_COLLECT_INTERVAL;
|
public static int GARBAGE_COLLECT_INTERVAL;
|
||||||
public static int SAVE_INTERVAL;
|
public static int SAVE_INTERVAL;
|
||||||
|
public static String DATE_FORMAT;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
loadEnv();
|
loadEnv();
|
||||||
|
@ -87,6 +88,8 @@ public class Config {
|
||||||
GARBAGE_COLLECT_INTERVAL = Integer.parseInt(props.getProperty("garbage-collect-interval"));
|
GARBAGE_COLLECT_INTERVAL = Integer.parseInt(props.getProperty("garbage-collect-interval"));
|
||||||
SAVE_INTERVAL = Integer.parseInt(props.getProperty("save-interval"));
|
SAVE_INTERVAL = Integer.parseInt(props.getProperty("save-interval"));
|
||||||
|
|
||||||
|
DATE_FORMAT = props.getProperty("date-format");
|
||||||
|
|
||||||
props.clear();
|
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") + ")";
|
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") + ")";
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.moparscape.msc.gs.util;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.moparscape.msc.config.Config;
|
||||||
import org.moparscape.msc.gs.Instance;
|
import org.moparscape.msc.gs.Instance;
|
||||||
import org.moparscape.msc.gs.model.World;
|
import org.moparscape.msc.gs.model.World;
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ public class Logger {
|
||||||
* Simple date formatter to keep a date on outputs
|
* Simple date formatter to keep a date on outputs
|
||||||
*/
|
*/
|
||||||
private static SimpleDateFormat formatter = new SimpleDateFormat(
|
private static SimpleDateFormat formatter = new SimpleDateFormat(
|
||||||
"yyyy.MM.dd HH:mm:ss");
|
Config.DATE_FORMAT);
|
||||||
|
|
||||||
public static void connection(Object o) {
|
public static void connection(Object o) {
|
||||||
// Logging.debug(o.toString());
|
// Logging.debug(o.toString());
|
||||||
|
|
Loading…
Reference in New Issue