java - LogHandler flush vs direct output in publish -



java - LogHandler flush vs direct output in publish -

i'm writing own java.util.logging.handler, , dont understand concept there... have publish method here contains logic see if logrecord should shown, formatter (or simpleformatter if .getformatter() == null) , set formatted string cache.

now wrote flush() method , i'm getting in problem here: flush() method never called java, when error occured, not shown. set phone call of flush() publish() method , can see log messages... dont see conecept here? when should flush() called , whom? or have create now, , phone call flush() own in publish() method?

if take example: http://www.java2s.com/code/java/language-basics/howtowritecustomloghandler.htm dont flush() method

probably bit late benefit of others...

im seeing similar, , assumed similar behaviour you

i had @ usages of , seems way flush in standard way, , seems guarantee flushed on close more anything.

some people "flush themselves", suppose guaranteeing superclasses can benefit flush also.

finally since there no threshold command on flush , since im not seeing beingness called in debug sessions, or code phone call don't think java gives in regard.

java logging handler

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -