Commit 63ece288 authored by Theodore Lopez's avatar Theodore Lopez

replace all println by logging

parent 1c54937a
......@@ -304,7 +304,7 @@ public abstract class AbstractEntity extends Thread {
try{
Thread.sleep(ServerLoop.frame - (ctime - ltime));
}catch(InterruptedException e){
//System.out.println("got interrupted!");
//Logging.getInstance().getLogger().info("got interrupted!");
}
}
}
......
......@@ -20,7 +20,7 @@ public class EffectPackageInitialiser {
Logging.getInstance().getLogger().info("Initialising package effects...");
EffectFactory.getInstance();
for (EffectKey unregisteredEffectKey : EffectFactory.getInstance().checkEffectKeyRegisteringExhaustivity()) {
System.out.println("* Warning: EffectKey not registered in EffectFactory: \"" + unregisteredEffectKey.name() + "\"");
Logging.getInstance().getLogger().info("* Warning: EffectKey not registered in EffectFactory: \"" + unregisteredEffectKey.name() + "\"");
}
Logging.getInstance().getLogger().info("...package effects initialised");
}
......
......@@ -72,7 +72,7 @@ public class GameContent implements Serializable{
Relayer followerRelayer = Relayers.addNewRelayer(follower);
AIControler.add(this, followerRelayer, EnumBehaviourType.Follower);
}
System.out.println("GameContent class: One gameContent created by"+Thread.currentThread().getId());
Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
}
......@@ -192,7 +192,7 @@ public class GameContent implements Serializable{
for(Character player: players){
player.setXY(posX, posY);
}
System.out.println("GameContent class: One gameContent created by"+Thread.currentThread().getId());
Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
}
......
......@@ -120,7 +120,6 @@ public class SpeciesArray {
public static void main(String[] args) {
System.out.println(array);
}
/**
* Beware, throw an exception with the given message !
* @param message
......
......@@ -215,7 +215,7 @@ public class Circle implements Zone {
return "Circle : "+ center.toString() + " Radius:" + radius ;
}
public static void main(String[] args) {
Circle c=new Circle(Point.construct(3,3),3);
System.out.println(c.getBorderPoint(Direction.LEFT));
......
......@@ -124,7 +124,6 @@ public class ServerLoop extends Thread {
* */
void executeFrame(GameContent gameContent) throws InterruptedException {
while (!(queue.isEmpty()) && queue.peek().getTime() == cframe) {
//System.out.println("Coucou, local execution");
Event event = queue.poll().getEvent();
Event toBeSentToClientsEvent = event.apply(gameContent);
networkConnection.sendEvent(toBeSentToClientsEvent);
......
......@@ -2,6 +2,7 @@ package graphics.graphical_utility;
import core.zone.Point;
import graphics.guiSkeleton.mapManagement.GraphicsMapPoint;
import logging.Logging;
/**
* Created by etouss on 20/12/2015.
......@@ -26,7 +27,7 @@ public final class GraphicalBridgeConfiguration {
//For checking the core2Graphics method
public static void main(String[] args){
System.out.println("DistanceConverterCheck: Input="+50+", Output="+ core2Graphics(50));
Logging.getInstance().getLogger().info("DistanceConverterCheck: Input="+50+", Output="+ core2Graphics(50));
}
/**
......
......@@ -4,6 +4,7 @@ import core.abilities.AbilityPackageInitialiser;
import core.abilities.effects.EffectPackageInitialiser;
import gameloop.LocalGameLoop;
import graphics.graphical_abstraction.GraphicsMasterAbstraction;
import logging.Logging;
/**
* Created by dupriez on 10/11/15.
......@@ -27,7 +28,7 @@ public class Igniter_Main {
/** Launch the GUI (and thus the game) **/
GraphicsMaster.build();
GraphicsMasterAbstraction gm = GraphicsMasterAbstraction.getInstance();
System.out.println("Starting GUI...");
Logging.getInstance().getLogger().info("Starting GUI...");
gm.launchGUI();
}
}
......@@ -7,6 +7,7 @@ import graphics.guiSkeleton.GraphicsMaster;
import graphics.guiSkeleton.guiPanel.menuPanel.facilities.ButtonMaker;
import graphics.guiSkeleton.guiPanel.menuPanel.facilities.MenuPanel;
import graphics.ingame_input_listener.Input;
import logging.Logging;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
......@@ -86,7 +87,7 @@ public class MainMenuPanel extends MenuPanel implements MainMenuPanelAbstraction
@Override
public void initialise() {
// underlyingMainMenuPanel.setPreferredSize(new Dimension(getSize().width, getSize().height));
// System.out.println("Dimensions= "+getSize().width+", "+getSize().height);
// Logging.getInstance().getLogger().info"Dimensions= "+getSize().width+", "+getSize().height);
// setSize(new Dimension(getSize().width, getSize().height));
}
......
......@@ -3,6 +3,7 @@ package ingame_programming;
import java.io.InputStream;
import java.util.*;
import core.gamestate.GameState;
import logging.Logging;
import core.gamestate.Character;
/**
* This class is used to register data from IGPpanel.
......@@ -278,13 +279,13 @@ public class FollowerBehaviour {
/** A debug fonction that allows to Print the Instructions according to the FollowerBehaviour */
public void PrintElements() {
for(int i = 0; i< numberOfRules; i++) {
System.out.println("Instruction number" + i);
System.out.println(" Action :" + actions[i]);
Logging.getInstance().getLogger().info("Instruction number" + i);
Logging.getInstance().getLogger().info(" Action :" + actions[i]);
String s = " Target :";
for (String t : targets.get(i)) {
s = s + " " + t;
}
System.out.println(s);
Logging.getInstance().getLogger().info(s);
}
}
}
package ingame_programming;
import graphics.ingame_input_listener.Input;
import logging.Logging;
import graphics.guiSkeleton.GUIColorsAndFonts;
import graphics.guiSkeleton.GraphicsMaster;
import javax.swing.*;
......@@ -25,7 +26,7 @@ import core.abilities.AbilityKey;
public class TestIGP {
public static void main(String argv[]) throws ParseException {
System.out.println("Bonjour");
Logging.getInstance().getLogger().info("Bonjour");
FollowerBehaviour fb = new FollowerBehaviour(4);
Script parser = new Script(stringToStream("attaque ennemi (avec PV < 50% et (avec DEF < 50 ou non avec MEN < 50)) ou avec DEF = 50"));
ArrayList<String> targett = parser.checkInput();
......
package ingame_programming;
import graphics.ingame_input_listener.Input;
import logging.Logging;
import graphics.guiSkeleton.GUIColorsAndFonts;
import graphics.guiSkeleton.GraphicsMaster;
import javax.swing.*;
......@@ -25,7 +26,7 @@ import core.abilities.AbilityKey;
public class Testig {
public static void main(String argv[]) throws ParseException {
System.out.println("Bonjour");
Logging.getInstance().getLogger().info("Bonjour");
Script parser = new Script(stringToStream("attaque ennemi (avec PV < 50% et (avec DEF < 50 ou non possedant potion)) ou avec DEF = 50"));
parser.Instruction();
Zone zone = EmptyZone.getEmptyZone();
......
......@@ -38,7 +38,6 @@ public class MapGenerationTestMain {
}
System.out.print(s);
}
System.out.println();
}
}
......
......@@ -17,7 +17,6 @@ public class TestEvent implements Event{
}
@Override
public boolean execute(GameContent gameContent) {
//System.out.println("TestEvent: Executing vital stuff...");
return true;
}
......
......@@ -123,7 +123,7 @@ public class ServerConnectionTest{
@Test
public void testSendEvents(){
try{
System.out.println(server);
//System.out.println(server);
server.sendEvent(e);
ObjectForTest event1 = (ObjectForTest)client1.getInputStream().readObject();
ObjectForTest event2 = (ObjectForTest)client2.getInputStream().readObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment