Java Code Examples for java.util.logging.FileHandler#flush()
The following examples show how to use
java.util.logging.FileHandler#flush() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CheckZombieLockTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 2
Source File: CheckZombieLockTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 3
Source File: CheckZombieLockTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 4
Source File: CheckZombieLockTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 5
Source File: CheckZombieLockTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 6
Source File: CheckZombieLockTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 7
Source File: CheckZombieLockTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 8
Source File: CheckZombieLockTest.java From hottub with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 9
Source File: CheckZombieLockTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 10
Source File: CheckZombieLockTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }
Example 11
Source File: JavaLoggerFileHandler.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod") @Override public void flush() { FileHandler delegate0 = delegate; if (delegate0 != null) delegate0.flush(); }
Example 12
Source File: CheckZombieLockTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static FileHandler createFileHandler(File writableDir) throws SecurityException, RuntimeException, IOException { // Test 1: make sure we can create FileHandler in writable directory try { FileHandler handler = new FileHandler("%t/" + WRITABLE_DIR + "/log.log"); handler.publish(new LogRecord(Level.INFO, handler.toString())); handler.flush(); return handler; } catch (IOException ex) { throw new RuntimeException("Test failed: should have been able" + " to create FileHandler for " + "%t/" + WRITABLE_DIR + "/log.log in writable directory.", ex); } }