Moved loading configs after creating log folders.
This commit is contained in:
@@ -153,6 +153,8 @@ public class GameServer
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
final long serverLoadStart = System.currentTimeMillis();
|
||||
|
||||
// GUI
|
||||
if (!GraphicsEnvironment.isHeadless())
|
||||
{
|
||||
@@ -160,11 +162,8 @@ public class GameServer
|
||||
new Gui();
|
||||
}
|
||||
|
||||
// Load GameServer Configs
|
||||
Config.load(ServerMode.GAME);
|
||||
|
||||
// Create log folder
|
||||
final File logFolder = new File(Config.DATAPACK_ROOT, "log");
|
||||
final File logFolder = new File(".", "log");
|
||||
logFolder.mkdir();
|
||||
|
||||
// Create input stream for log file -- or store file data into memory
|
||||
@@ -173,7 +172,8 @@ public class GameServer
|
||||
LogManager.getLogManager().readConfiguration(is);
|
||||
}
|
||||
|
||||
final long serverLoadStart = System.currentTimeMillis();
|
||||
// Initialize config
|
||||
Config.load(ServerMode.GAME);
|
||||
|
||||
Util.printSection("Database");
|
||||
DatabaseFactory.init();
|
||||
@@ -188,8 +188,8 @@ public class GameServer
|
||||
Util.printSection("IdFactory");
|
||||
if (!IdFactory.getInstance().isInitialized())
|
||||
{
|
||||
LOGGER.info("Could not read object IDs from DB. Please Check Your Data.");
|
||||
throw new Exception("Could not initialize the ID factory");
|
||||
LOGGER.severe("IdFactory: Could not read object IDs from database. Please check your configuration.");
|
||||
throw new Exception("Could not initialize the ID factory!");
|
||||
}
|
||||
|
||||
new File(Config.DATAPACK_ROOT, "data/clans").mkdirs();
|
||||
|
@@ -38,6 +38,9 @@ import org.l2jmobius.loginserver.network.gameserverpackets.ServerStatus;
|
||||
import org.l2jmobius.loginserver.ui.Gui;
|
||||
import org.l2jmobius.telnet.TelnetStatusThread;
|
||||
|
||||
/**
|
||||
* @author KenM
|
||||
*/
|
||||
public class LoginServer
|
||||
{
|
||||
public Logger LOGGER = Logger.getLogger(LoginServer.class.getName());
|
||||
@@ -68,9 +71,6 @@ public class LoginServer
|
||||
new Gui();
|
||||
}
|
||||
|
||||
// Load LoginServer Configs
|
||||
Config.load(ServerMode.LOGIN);
|
||||
|
||||
// Create log folder
|
||||
final File logFolder = new File(".", "log");
|
||||
logFolder.mkdir();
|
||||
@@ -86,6 +86,9 @@ public class LoginServer
|
||||
LOGGER.warning(getClass().getSimpleName() + ": " + e.getMessage());
|
||||
}
|
||||
|
||||
// Load Config
|
||||
Config.load(ServerMode.LOGIN);
|
||||
|
||||
// Prepare Database
|
||||
DatabaseFactory.init();
|
||||
|
||||
@@ -95,7 +98,7 @@ public class LoginServer
|
||||
}
|
||||
catch (GeneralSecurityException e)
|
||||
{
|
||||
LOGGER.severe("Failed initializing LoginController " + e);
|
||||
LOGGER.severe("FATAL: Failed initializing LoginController. Reason: " + e);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user