|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.transport.nhttp.AccessLogger
public class AccessLogger
Class that logs the Http Accesses to the access log files. Code segment borrowed from Apache Tomcat's org.apache.catalina.valves.AccessLogValve with thanks.
| Field Summary | |
|---|---|
static String |
ACCESS_LOG_ID
|
protected File |
currentLogFile
The current log file we are writing to. |
protected SimpleDateFormat |
fileDateFormatter
A date formatter to format a Date into a date in the given file format |
protected boolean |
isRotatable
Can the log file be rotated. |
protected PrintWriter |
writer
The PrintWriter to which we are currently logging, if any. |
| Constructor Summary | |
|---|---|
AccessLogger(org.apache.commons.logging.Log log)
|
|
| Method Summary | |
|---|---|
static void |
handleThrowable(Throwable t)
Checks whether the supplied Throwable is one that needs to be re-thrown and swallows all others. |
protected void |
initOpen()
|
void |
log(String message)
Log the specified message to the log file, switching files if the date has changed since the previous log call. |
protected void |
open()
Open the new log file for the date specified by dateStamp. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ACCESS_LOG_ID
protected SimpleDateFormat fileDateFormatter
protected PrintWriter writer
protected File currentLogFile
protected boolean isRotatable
| Constructor Detail |
|---|
public AccessLogger(org.apache.commons.logging.Log log)
| Method Detail |
|---|
public void log(String message)
message - Message to be loggedprotected void initOpen()
protected void open()
dateStamp.
public static void handleThrowable(Throwable t)
t - the Throwable to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||