Public Member Functions | |
GuiLoggingThread (JTextArea loggingTextPane, String host) | |
String | getHost () |
void | run () |
void | quit () |
Definition at line 45 of file GuiLoggingThread.java.
|
Creates a new
Definition at line 59 of file GuiLoggingThread.java. 00060 { 00061 super(); 00062 this.host = host; 00063 this.loggingTextPane = loggingTextPane; 00064 }
|
|
Returns the host value.
Definition at line 71 of file GuiLoggingThread.java. 00072 {
00073 return host;
00074 }
|
|
Quitting Definition at line 105 of file GuiLoggingThread.java. 00106 {
00107 if(nodeThread!=null)
00108 nodeThread.interrupt();
00109 }
|
|
Definition at line 78 of file GuiLoggingThread.java. 00079 { 00080 try 00081 { 00082 BasicConfigurator.configure(); 00083 JTextAreaWriter writer = new JTextAreaWriter(loggingTextPane); 00084 Layout layout = new PatternLayout("%d %-5p %c{3} %m\n"); 00085 WriterAppender appender = new WriterAppender(layout, writer); 00086 appender.setImmediateFlush(true); 00087 LogManager.getRootLogger().removeAllAppenders(); 00088 LogManager.getRootLogger().addAppender(appender); 00089 logSocket = new Socket(host, 9010); 00090 node = new SocketNode(logSocket, LogManager.getLoggerRepository()); 00091 nodeThread = new Thread(node); 00092 nodeThread.start(); 00093 } 00094 catch (Exception e) 00095 { 00096 // ignore 00097 } 00098 }
|