Top Description Fields Constructors Methods
org.apache.log.output

public abstract Class AbstractWrappingTarget

extends AbstractTarget
Class Inheritance
Known Direct Subclasses
org.apache.log.output.AsyncLogTarget
Imports
org.apache.log.LogTarget, org.apache.log.util.Closeable

Abstract base class for targets that wrap other targets. The class provides functionality for optionally closing a wrapped target that implements org.apache.log.util.Closeable.
Author
Avalon Development Team
See Also
org.apache.log.util.Closeable

Field Summary

Modifier and TypeField and Description
private final boolean
private final LogTarget

Constructor Summary

AccessConstructor and Description
public
AbstractWrappingTarget(final LogTarget
the underlying target
logTarget
,
final boolean
boolean flag indicating whether the wrapped log target should be closed when this target is closed.

Note

This flag has no effect unless the underlying target implements org.apache.log.util.Closeable.

closeWrappedTarget
)

Creation of a new wrapping log target.

public
AbstractWrappingTarget(final LogTarget
the underlying target
logTarget
)

Creation of a new wrapping log target.

Method Summary

Modifier and TypeMethod and Description
public void
protected final LogTarget
getLogTarget()

Return the target for subclasses

Inherited from org.apache.log.output.AbstractTarget:
doProcessEventgetErrorHandlerisOpenopenprocessEventsetErrorHandler

Field Detail

m_closeWrappedback to summary
private final boolean m_closeWrapped
m_wrappedLogTargetback to summary
private final LogTarget m_wrappedLogTarget

Constructor Detail

AbstractWrappingTargetback to summary
public AbstractWrappingTarget(final LogTarget logTarget, final boolean closeWrappedTarget)

Creation of a new wrapping log target.

Parameters
logTarget:LogTarget

the underlying target

closeWrappedTarget:boolean

boolean flag indicating whether the wrapped log target should be closed when this target is closed.

Note

This flag has no effect unless the underlying target implements org.apache.log.util.Closeable.

See Also
org.apache.log.util.Closeable
AbstractWrappingTargetback to summary
public AbstractWrappingTarget(final LogTarget logTarget)

Creation of a new wrapping log target. The underlying log target will not be closed when this target is closed.

Parameters
logTarget:LogTarget

the underlying target

Method Detail

closeback to summary
public void close()

Overrides org.apache.log.output.AbstractTarget.close.

Implements org.apache.log.util.Closeable.close.

Doc from org.apache.log.output.AbstractTarget.close.

Shutdown target. Attempting to write to target after close() will cause errors to be logged.

getLogTargetback to summary
protected final LogTarget getLogTarget()

Return the target for subclasses