org.apache.log.output

Class ServletOutputLogTarget

public class ServletOutputLogTarget extends AbstractOutputTarget

Generic logging interface. Implementations are based on the strategy pattern.

Author: Tommy Santoso

Field Summary
ServletContextm_context
Constructor Summary
ServletOutputLogTarget(ServletContext context, Formatter formatter)
Constructor.
ServletOutputLogTarget(ServletContext context)
Constructor.
Method Summary
voidclose()
Shutdown target.
protected voidwrite(String message)
Logs message to servlet context log file

Field Detail

m_context

private ServletContext m_context

Constructor Detail

ServletOutputLogTarget

public ServletOutputLogTarget(ServletContext context, Formatter formatter)
Constructor.

Parameters: context ServletContext to use for logging.

ServletOutputLogTarget

public ServletOutputLogTarget(ServletContext context)
Constructor.

Parameters: context ServletContext to use for logging.

Method Detail

close

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

write

protected void write(String message)
Logs message to servlet context log file

Parameters: message message to log to servlet context log file.