import java.util.logging.Logger;
import java.util.logging.SocketHandler;
public class Main {
public static void main(String args[]) throws Exception{
SocketHandler handler = null;
Logger logger = Logger.getLogger("your.logging");
handler = new SocketHandler("127.0.0.1", 8080);
logger.addHandler(handler);
logger.warning("SocketHandler is working...");
}
}
|