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

public Class ServletOutputLogTarget

extends AbstractOutputTarget
Class Inheritance
Imports
javax.servlet.ServletContext, org.apache.log.format.Formatter

Generic logging interface. Implementations are based on the strategy pattern.
Author
Tommy Santoso

Field Summary

Modifier and TypeField and Description
private ServletContext

Constructor Summary

AccessConstructor and Description
public
ServletOutputLogTarget(final ServletContext
ServletContext to use for logging.
context
,
final Formatter formatter)

Constructor.

public
ServletOutputLogTarget(final ServletContext
ServletContext to use for logging.
context
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
protected void
write(final String
message to log to servlet context log file.
message
)

Overrides org.apache.log.output.AbstractOutputTarget.write.

Logs message to servlet context log file
Inherited from org.apache.log.output.AbstractOutputTarget:
doProcessEventgetFormatteropen

Field Detail

m_contextback to summary
private ServletContext m_context

Constructor Detail

ServletOutputLogTargetback to summary
public ServletOutputLogTarget(final ServletContext context, final Formatter formatter)

Constructor.

Parameters
context:ServletContext

ServletContext to use for logging.

ServletOutputLogTargetback to summary
public ServletOutputLogTarget(final ServletContext context)

Constructor.

Parameters
context:ServletContext

ServletContext to use for logging.

Method Detail

closeback to summary
public synchronized void close()

Overrides org.apache.log.output.AbstractOutputTarget.close.

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

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

writeback to summary
protected void write(final String message)

Overrides org.apache.log.output.AbstractOutputTarget.write.

Logs message to servlet context log file

Parameters
message:String

message to log to servlet context log file.