Java Code Examples for java.util.logging.Handler.flush()

The following are Jave code examples for showing how to use flush() of the java.util.logging.Handler class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: incubator-netbeans   File: TopLogging.java   Source Code and License Vote up 6 votes
/** Allows tests to flush all standard handlers */
static void flush(boolean clear) {
    System.err.flush();


    Handler s = streamHandler;
    if (s != null) {
        s.flush();
    }

    Handler d = defaultHandler;
    if (d != null) {
        d.flush();
    }

    if (clear) {
        streamHandler = null;
        defaultHandler = null;
    }
}
 
Example 2
Project: incubator-netbeans   File: TopLogging.java   Source Code and License Vote up 4 votes
public void flush() {
    for (Handler h : instances) {
        h.flush();
    }
}
 
Example 3
Project: incubator-netbeans   File: LogsTooEarlyTest.java   Source Code and License Vote up 4 votes
@Override
public void flush() {
    for (Handler h : Lookup.getDefault().lookupAll(Handler.class)) {
        h.flush();
    }
}