private void showCommandPrompt() {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		System.out.print(localName + "# ");
		String inputCommand;
		try {
			while ((inputCommand = in.readLine()) != null) {
				String[] tokens = inputCommand.split(" ");
					if ("show".equals(tokens[0])) {
							ArrayList<TimeStampedMessage> tmpLogs= new ArrayList<TimeStampedMessage>();
							TimeStampedMessage message;
							while ((message = (TimeStampedMessage) receive()) != null) {
								tmpLogs.add(message);
								// System.out.println(message);
							}
							Collections.sort(tmpLogs,
									new TimeStampedMessageComparator());
							this.sortedLogs.addAll(tmpLogs);
							if(tokens.length == 1){
								this.displayLogs(this.sortedLogs);
							}
							else if("new".equals(tokens[1])){
								this.displayLogs(tmpLogs);
							}
					} else if ("q".equals(tokens[0])) {
						System.exit(0);
					} else {
						// Invalid command
						System.out.println("Couldn't recognize this command.");
					}
				}
				System.out.print(localName + "# ");
		}
		catch (IOException e) {
			e.printStackTrace();
		}
	}