@Override public void close() { synchronized (outputLock) { safeClose(out); out = null; } super.close(); }
/** {@inheritDoc} */ public void close() throws SecurityException { checkAccess(this); if (stateUpdater.getAndSet(this, 2) != 2) { thread.interrupt(); super.close(); } }
/** * Close this logger. * * @throws SecurityException if the caller does not have sufficient permission */ public void close() throws SecurityException { checkAccess(this); setWriter(null); super.close(); }
@Override public void close() throws SecurityException { checkAccess(this); synchronized (outputLock) { safeClose(writer); writer = null; initialize = true; } super.close(); }
@Override public final void close() throws SecurityException { checkAccess(this); synchronized (this) { if (!logRecords.isEmpty()) { Formatter formatter = getFormatter(); if (formatter == null) { formatter = new PatternFormatter("%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"); } StandardOutputStreams.printError("The DelayedHandler was closed before any children handlers were " + "configured. Messages will be written to stderr."); // Always attempt to drain the queue ExtLogRecord record; while ((record = logRecords.pollFirst()) != null) { StandardOutputStreams.printError(formatter.format(record)); } } } activated = false; super.close(); }