((LoggingBufferTableModel)lp.getLogbookModel()).startRefreshLoop();
} catch(IOException ie){
ie.printStackTrace();
System.exit(0);
}
Logger lr = null;
try {
SocketBufferHandler sbh=new SocketBufferHandler("localhost",4321);
lr=Logger.getLogger("TEST");
lr.addHandler(sbh);
lr.setUseParentHandlers(false);
lr.warning("Start");
} catch (IOException e) {
e.printStackTrace();
System.exit(0);
}
f.addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e){
try {
buffer.closeServer();
} catch (IOException e1) {
e1.printStackTrace();
System.exit(0);
}
new TestBinary(buffer,"TEST");
}
});
f.pack();
f.show();
int i=0;
while(true){
lr.info("Write "+i);
i++;
if(i%10==0){
lr.log(Level.SEVERE,"dummy",new IOException("bar"));
}
try {
Thread.sleep(100);
} catch (InterruptedException e1) {
e1.printStackTrace();