org.apache.log.output
Class ServletOutputLogTarget
java.lang.Object
org.apache.log.output.AbstractTarget
org.apache.log.output.AbstractOutputTarget
org.apache.log.output.ServletOutputLogTarget
- All Implemented Interfaces:
- ErrorAware, LogTarget, Closeable
public class ServletOutputLogTarget
- extends AbstractOutputTarget
Generic logging interface. Implementations are based on the strategy
pattern.
- Author:
- Tommy Santoso
Method Summary |
void |
close()
Shutdown target. |
protected void |
write(String message)
Logs message to servlet context log file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_context
private ServletContext m_context
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.
write
protected void write(String message)
- Logs message to servlet context log file
- Overrides:
write
in class AbstractOutputTarget
- Parameters:
message
- message to log to servlet context log file.
close
public void close()
- Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
- Specified by:
close
in interface Closeable
- Overrides:
close
in class AbstractOutputTarget
Copyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.