Added NetLogServer class

This commit is contained in:
Ziver Koc 2013-05-07 16:19:47 +00:00
parent 0dfd6cc049
commit 4360a11357
7 changed files with 68 additions and 20 deletions

View file

@ -0,0 +1,29 @@
package zutil.test;
import java.util.logging.Level;
import java.util.logging.Logger;
import zutil.log.LogUtil;
import zutil.log.net.NetLogServer;
public class NetLogServerTest {
public static final Logger logger = LogUtil.getLogger();
public static void main(String[] args){
LogUtil.setGlobalLevel(Level.FINEST);
LogUtil.addGlobalHandler(new NetLogServer(5050));
while(true){
logger.log(Level.SEVERE, "Test Severe");
logger.log(Level.WARNING, "Test Warning");
logger.log(Level.INFO, "Test Info");
logger.log(Level.FINE, "Test Fine");
logger.log(Level.FINER, "Test Finer");
logger.log(Level.FINEST, "Test Finest");
logger.log(Level.SEVERE, "Test Exception", new Exception("Test"));
try{Thread.sleep(3000);}catch(Exception e){}
}
}
}