public void log(Level level,String str){
		if(level.intValue()>=LogLevel.intValue()){
			StringBuilder out = new StringBuilder();
			out.append("["+clazz.getName()+"]");
			out.append("["+level.getName()+"]");
			Time currentTime;
			if(Simulator.getWorld()!=null && Simulator.getWorld().getCurrentTime()!=null)
				currentTime = Simulator.getWorld().getCurrentTime();
			else
				currentTime=null;
			out.append("["+((currentTime!=null)? currentTime :"no time") +"]");
			out.append(str);
			
			if(Simulator.getGUI()!=null){
				if(level.intValue()>FINE.intValue()){
					JTextArea text = Simulator.getGUI().getLogWindow().getTextArea();
					text.append(out.toString()+"\n");
					text.setCaretPosition(text.getText().length());
				}else{
					System.out.println(out);
				}
			}else{
				System.out.println(out);
			}
		}
	}