Top Description Fields Constructors Methods
org.apache.tomcat.jakartaee

pack-priv Class AntHandler

extends Handler
Class Inheritance
Imports
java.util.logging.Handler, .Level, .LogRecord, org.apache.tools.ant.Project, .Task

JUL log handler redirecting the messages logged to Ant.

Field Summary

Modifier and TypeField and Description
private final Task

Constructor Summary

AccessConstructor and Description
pack-priv

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 int
toAntLevel(Level level)

Convert the JUL level to the equivalent Ant one.

Inherited from java.util.logging.Handler:
getEncodinggetErrorManagergetFiltergetFormattergetLevelisLoggablereportErrorsetEncodingsetErrorManagersetFiltersetFormattersetLevel

Field Detail

taskback to summary
private final Task task

Constructor Detail

AntHandlerback to summary
pack-priv AntHandler(Task task)

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
toAntLevelback to summary
private int toAntLevel(Level level)

Convert the JUL level to the equivalent Ant one.