|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.Prominic.jFTPd.FTPLogger
public class FTPLogger
This class receives FTPEvents and logs them into the log file.
| Field Summary | |
|---|---|
protected java.text.DateFormat |
dateFormat
|
protected boolean |
echoEnabled
|
protected boolean |
errorEchoEnabled
|
protected java.io.PrintWriter |
errout
|
protected java.lang.String |
lineEnding
|
protected java.io.PrintWriter |
logout
|
| Constructor Summary | |
|---|---|
FTPLogger(java.lang.String logfile,
java.lang.String errfile)
Creates an FTPLogger class. |
|
| Method Summary | |
|---|---|
protected static java.lang.String |
exceptionStackTrace(java.lang.Throwable t)
Returns the exception's stack trace, as String. |
void |
log(java.util.Date date,
java.lang.String entry,
java.io.PrintWriter out)
Logs a message to the log file. |
void |
logFTPEvent(FTPEvent event)
Logs an FTPEvent (including arguments of the event). |
void |
setEchoEnabled(boolean q)
Sets if log messages should be displayed on STDOUT. |
void |
setErrorEchoEnabled(boolean q)
Sets if error messages should be displayed on STDOUT. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Called when there's and FTPEvent which needs to be logged. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean echoEnabled
protected boolean errorEchoEnabled
protected java.io.PrintWriter logout
protected java.io.PrintWriter errout
protected java.text.DateFormat dateFormat
protected java.lang.String lineEnding
| Constructor Detail |
|---|
public FTPLogger(java.lang.String logfile,
java.lang.String errfile)
throws java.io.IOException
logfile - - log fileerrfile - - error file
java.io.IOException - - if something goes wrong while opening the files.| Method Detail |
|---|
protected static java.lang.String exceptionStackTrace(java.lang.Throwable t)
t - - exception
public void log(java.util.Date date,
java.lang.String entry,
java.io.PrintWriter out)
date - - date of logentry - - messageout - - log output stream.public void logFTPEvent(FTPEvent event)
event - - event to be logged.public void setEchoEnabled(boolean q)
q - - echo enabled or not.public void setErrorEchoEnabled(boolean q)
q - - error echo enabled.
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observero - - observable (not used).arg - - must be FTPEvent.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||