Logger changes

This commit is contained in:
austin 2022-05-17 16:21:24 -04:00
parent 9fc52918a3
commit a957a3f0ca
9 changed files with 12 additions and 11 deletions

View File

@ -476,7 +476,7 @@ public class LoadingThread extends Thread {
} }
} }
} }
System.out.println("Draw Cell Manager ready"); // System.out.println("Draw Cell Manager ready");
} }

View File

@ -38,7 +38,7 @@ public class SprintTree {
public void start(){ public void start(){
if(staminaCurrent > 0){ if(staminaCurrent > 0){
System.out.println("Starting sprinting"); // System.out.println("Starting sprinting");
state = SprintTreeState.SPRINTING; state = SprintTreeState.SPRINTING;
} }
} }

View File

@ -85,7 +85,7 @@ public class MillAbout extends AI {
} else { } else {
GroundMovementTree characterMoveTree = CreatureUtils.getEntityMovementTree(character); GroundMovementTree characterMoveTree = CreatureUtils.getEntityMovementTree(character);
characterMoveTree.slowdown(); characterMoveTree.slowdown();
System.out.println("Made it to destination"); // System.out.println("Made it to destination");
moveToTarget = false; moveToTarget = false;
millAbout = true; millAbout = true;
} }

View File

@ -54,7 +54,7 @@ public class DatabaseUtils {
if(line.length() > 1 && !line.startsWith("--")){ if(line.length() > 1 && !line.startsWith("--")){
if(line.contains(";")){ if(line.contains(";")){
accumulatorString = accumulatorString + line; accumulatorString = accumulatorString + line;
System.out.println("EXECUTE: " + accumulatorString); LoggerInterface.loggerDB.INFO("EXECUTE: " + accumulatorString);
controller.executePreparedStatement(accumulatorString); controller.executePreparedStatement(accumulatorString);
accumulatorString = ""; accumulatorString = "";
} else { } else {

View File

@ -65,17 +65,17 @@ public class NavMeshPathfinder {
//return path if found end //return path if found end
if(currentNode == endNode){ if(currentNode == endNode){
System.out.println("Found path!"); // System.out.println("Found path!");
//TODO: return path //TODO: return path
while(currentItem != null){ while(currentItem != null){
if(currentItem.node == endNode){ if(currentItem.node == endNode){
Entity waypoint = EntityUtils.spawnDrawableEntity("Models/waypoint1.fbx"); Entity waypoint = EntityUtils.spawnDrawableEntity("Models/waypoint1.fbx");
System.out.println(end); // System.out.println(end);
EntityUtils.getPosition(waypoint).set(end.x,end.y + 1,end.z); EntityUtils.getPosition(waypoint).set(end.x,end.y + 1,end.z);
EntityUtils.getRotation(waypoint).rotateLocalX(-(float)Math.PI/2.0f); EntityUtils.getRotation(waypoint).rotateLocalX(-(float)Math.PI/2.0f);
} else { } else {
Entity waypoint = EntityUtils.spawnDrawableEntity("Models/waypoint1.fbx"); Entity waypoint = EntityUtils.spawnDrawableEntity("Models/waypoint1.fbx");
System.out.println(currentItem.currentPos); // System.out.println(currentItem.currentPos);
EntityUtils.getPosition(waypoint).set(currentItem.currentPos.x,currentItem.currentPos.y + 1,currentItem.currentPos.z); EntityUtils.getPosition(waypoint).set(currentItem.currentPos.x,currentItem.currentPos.y + 1,currentItem.currentPos.z);
EntityUtils.getRotation(waypoint).rotateLocalX(-(float)Math.PI/2.0f); EntityUtils.getRotation(waypoint).rotateLocalX(-(float)Math.PI/2.0f);
} }

View File

@ -3,6 +3,7 @@ package electrosphere.game.server.saves;
import electrosphere.game.server.db.DatabaseUtils; import electrosphere.game.server.db.DatabaseUtils;
import electrosphere.game.server.terrain.manager.ServerTerrainManager; import electrosphere.game.server.terrain.manager.ServerTerrainManager;
import electrosphere.game.server.world.ServerWorldData; import electrosphere.game.server.world.ServerWorldData;
import electrosphere.logger.LoggerInterface;
import electrosphere.game.server.datacell.DataCellManager; import electrosphere.game.server.datacell.DataCellManager;
import electrosphere.main.Globals; import electrosphere.main.Globals;
import electrosphere.util.FileUtils; import electrosphere.util.FileUtils;
@ -75,7 +76,7 @@ public class SaveUtils {
public static boolean worldHasSave(String saveName){ public static boolean worldHasSave(String saveName){
String dirPath = deriveSaveDirectoryPath(saveName) + "/world.json"; String dirPath = deriveSaveDirectoryPath(saveName) + "/world.json";
System.out.println("Exists? " + dirPath); LoggerInterface.loggerEngine.DEBUG("Exists? " + dirPath);
return FileUtils.checkFileExists(dirPath); return FileUtils.checkFileExists(dirPath);
} }

View File

@ -17,6 +17,7 @@ public class LoggerInterface {
public static Logger loggerEngine; public static Logger loggerEngine;
public static Logger loggerStartup; public static Logger loggerStartup;
public static Logger loggerAuth; public static Logger loggerAuth;
public static Logger loggerDB;
public static void initLoggers(){ public static void initLoggers(){
loggerStartup = new Logger(LogLevel.WARNING); loggerStartup = new Logger(LogLevel.WARNING);
@ -24,8 +25,9 @@ public class LoggerInterface {
loggerFileIO = new Logger(LogLevel.WARNING); loggerFileIO = new Logger(LogLevel.WARNING);
loggerGameLogic = new Logger(LogLevel.WARNING); loggerGameLogic = new Logger(LogLevel.WARNING);
loggerRenderer = new Logger(LogLevel.WARNING); loggerRenderer = new Logger(LogLevel.WARNING);
loggerEngine = new Logger(LogLevel.DEBUG); loggerEngine = new Logger(LogLevel.WARNING);
loggerAuth = new Logger(LogLevel.INFO); loggerAuth = new Logger(LogLevel.INFO);
loggerDB = new Logger(LogLevel.INFO);
loggerStartup.INFO("Initialized loggers"); loggerStartup.INFO("Initialized loggers");
} }
} }

View File

@ -145,7 +145,6 @@ public class MenuGeneratorsInventory {
Entity item = Globals.draggedItem; Entity item = Globals.draggedItem;
//destroy real world item //destroy real world item
if(ItemUtils.getRealWorldEntity(item) != null){ if(ItemUtils.getRealWorldEntity(item) != null){
System.out.println("Destroy real world item");
ItemUtils.destroyInWorldItem(ItemUtils.getRealWorldEntity(item)); ItemUtils.destroyInWorldItem(ItemUtils.getRealWorldEntity(item));
} }
//eject from equip state //eject from equip state

View File

@ -156,7 +156,6 @@ public class FileUtils {
public static File getSaveFile(String saveName, String pathName){ public static File getSaveFile(String saveName, String pathName){
String sanitizedFilePath = sanitizeFilePath(pathName); String sanitizedFilePath = sanitizeFilePath(pathName);
String fullPath = "./saves/" + saveName + "/" + sanitizedFilePath; String fullPath = "./saves/" + saveName + "/" + sanitizedFilePath;
System.out.println(fullPath);
File targetFile = new File(fullPath); File targetFile = new File(fullPath);
return targetFile; return targetFile;
} }