public void printsortedlog(){
		for (int i = 0; i < list.size(); i++) {
			TimeStamp current = list.get(i).getTimeStamp();
			String data = (String) list.get(i).getData();
			System.out.printf("Current message is: %s\n", data);
			for(int j=0; j< list.size(); j++)
			{
				//So that you do not add yourself into the before after array
				if(j==i)
					continue;
				TimeStamp innercurrent = list.get(j).getTimeStamp(); 
				int compareoutput = current.compareTo(innercurrent);
				
				//This is to handle if logical clocks ar compared,
				//You just print unsorted array and return
				if(compareoutput == TimeCompare.ERROR){
					this.printunsortedlog();
					return;
				}
				else if(compareoutput == TimeCompare.EQUALS)
					equal.add(list.get(j));
				//Current is less than innercurrent
				else if(compareoutput == TimeCompare.BEFORE)
					after.add(list.get(j));
				//Current and inner current are concurrent
				else if(compareoutput == TimeCompare.CONCURRENT)
					concurrent.add(list.get(j));
				//
				else if(compareoutput == TimeCompare.AFTER)
					before.add(list.get(j));
			}
			this.printlog();
		}
	}