Skip to content

Instantly share code, notes, and snippets.

@gomo
Last active August 29, 2015 13:57
Show Gist options
  • Save gomo/9678115 to your computer and use it in GitHub Desktop.
Save gomo/9678115 to your computer and use it in GitHub Desktop.
STDOUTに即座に`flush`する`java.util.logging.Handler`
Handler handler = new StreamHandler(){
//初期化ブロック
{
setOutputStream(System.out);
setLevel(Level.ALL);
}
@Override
public void publish(LogRecord record){
super.publish(record);
flush();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment