public class AccessLogger
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS_LOG_ID |
protected java.io.File |
currentLogFile
The current log file we are writing to.
|
protected java.text.SimpleDateFormat |
fileDateFormatter
A date formatter to format a Date into a date in the given file format
|
static java.lang.String |
NHTTP_LOG_DIRECTORY |
protected java.io.PrintWriter |
writer
The PrintWriter to which we are currently logging, if any.
|
Constructor and Description |
---|
AccessLogger(org.apache.commons.logging.Log log) |
Modifier and Type | Method and Description |
---|---|
static void |
handleThrowable(java.lang.Throwable t)
Checks whether the supplied Throwable is one that needs to be
re-thrown and swallows all others.
|
protected void |
initOpen() |
void |
log(java.lang.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 . |
public static final java.lang.String NHTTP_LOG_DIRECTORY
public static final java.lang.String ACCESS_LOG_ID
protected java.text.SimpleDateFormat fileDateFormatter
protected java.io.PrintWriter writer
protected java.io.File currentLogFile
public void log(java.lang.String message)
message
- Message to be loggedprotected void initOpen()
protected void open()
dateStamp
.public static void handleThrowable(java.lang.Throwable t)
t
- the Throwable to checkCopyright © 2005-2021 Apache Software Foundation. All Rights Reserved.