Created
January 2, 2013 23:31
-
-
Save zack6849/4439368 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package multithread; | |
import java.io.PrintWriter; | |
import java.util.logging.Handler; | |
import java.util.logging.LogRecord; | |
public class LoggerHandler extends Handler{ | |
public PrintWriter out; | |
public LoggerHandler(PrintWriter out){ | |
this.out = out; | |
} | |
@Override | |
public void close() throws SecurityException { | |
return; | |
} | |
@Override | |
public void flush() { | |
return; | |
} | |
@Override | |
public void publish(LogRecord e) { | |
out.println(e.getMessage()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment