Top Fields Constructors Methods
org.postgresql.util

public Class LogWriterHandler

extends Handler
Class Inheritance
Imports
org.postgresql.jdbc.ResourceLock, org.checkerframework.checker.nullness.qual.Nullable, java.io.Writer, java.util.logging.ErrorManager, .Formatter, .Handler, .Level, .LogRecord, .SimpleFormatter

Field Summary

Modifier and TypeField and Description
private final ResourceLock
private @Nullable Writer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract java.util.logging.Handler.close.

Close the Handler and free all associated resources.

public void
flush()

Implements abstract java.util.logging.Handler.flush.

Flush any buffered output.

public void
publish(LogRecord
description of the log event. A null record is silently ignored and is not published
record
)

Implements abstract java.util.logging.Handler.publish.

Publish a LogRecord.

private void
setWriter(Writer writer)

Inherited from java.util.logging.Handler:
getEncodinggetErrorManagergetFiltergetFormattergetLevelisLoggablereportErrorsetEncodingsetErrorManagersetFiltersetFormattersetLevel

Field Detail

lockback to summary
private final ResourceLock lock

Hides java.util.logging.Handler.lock.

writerback to summary
private @Nullable Writer writer

Constructor Detail

LogWriterHandlerback to summary
public LogWriterHandler(Writer inWriter)
Annotations
@SuppressWarnings:method.invocation

Method Detail

closeback to summary
public void close() throws SecurityException

Implements abstract java.util.logging.Handler.close.

Doc from java.util.logging.Handler.close.

Close the Handler and free all associated resources.

The close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.

Annotations
@Override
Exceptions
SecurityException:
if a security manager exists and if the caller does not have LoggingPermission("control").
flushback to summary
public void flush()

Implements abstract java.util.logging.Handler.flush.

Doc from java.util.logging.Handler.flush.

Flush any buffered output.

Annotations
@Override
publishback to summary
public void publish(LogRecord record)

Implements abstract java.util.logging.Handler.publish.

Doc from java.util.logging.Handler.publish.

Publish a LogRecord.

The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.

The Handler is responsible for formatting the message, when and if necessary. The formatting should include localization.

Parameters
record:LogRecord

description of the log event. A null record is silently ignored and is not published

Annotations
@Override
setWriterback to summary
private void setWriter(Writer writer) throws IllegalArgumentException