import java.net.*;
import java.io.*;

public class ProducerConsumerTest {

    static InetAddress SADDR;
    static myLoggingClient LC;
    static myTimestamper TS = new myTimestamper();

    public static void main(String[] args) throws IOException {
	SADDR = InetAddress.getByName(System.getProperty("host","localhost"));
	LC = new myLoggingClient (SADDR,Integer.getInteger("port",8080).intValue()); 
        CubbyHole c = new CubbyHole();
        Producer p1 = new Producer(c, 1);
        Consumer c1 = new Consumer(c, 1);

        p1.start();
        c1.start();
		try {	c1.join(); 	p1.join(); }
		catch ( InterruptedException e ) {System.out.println(e);}
	LC.viewRecords(10000000000l);
	LC.flush();
    }
}
