public class AccessLogger extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
AccessLogger(org.apache.commons.logging.Log log) |
Modifier and Type | Method and Description |
---|---|
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 . |
protected SimpleDateFormat fileDateFormatter
protected PrintWriter writer
protected File currentLogFile
protected boolean isRotatable
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 checkCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.