|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.jigsaw.http.Logger | +--org.w3c.jigsaw.http.CommonLogger
The CommonLogger class implements the abstract Logger class. The resulting log will conform to the common log format).
Logger
Field Summary | |
protected byte[] |
buffer
|
protected int |
bufptr
|
protected int |
bufsize
|
static java.lang.String |
BUFSIZE_P
Name of the property indicating the buffer size for the logger. |
protected java.io.RandomAccessFile |
errlog
|
static java.lang.String |
ERRLOGNAME_P
Name of the property indicating the error log file. |
protected java.io.RandomAccessFile |
log
|
protected java.lang.String |
logdir
|
static java.lang.String |
LOGNAME_P
Name of the property indicating the log file. |
protected ObservableProperties |
props
|
protected httpd |
server
|
protected java.io.RandomAccessFile |
trace
|
static java.lang.String |
TRACELOGNAME_P
Name of the property indicating the server trace file. |
Method Summary | |
protected void |
appendLogBuffer(java.lang.String msg)
|
void |
errlog(Client client,
java.lang.String msg)
|
void |
errlog(java.lang.String msg)
|
protected void |
errlogmsg(java.lang.String msg)
|
protected java.lang.String |
getFilename(java.lang.String propname,
java.lang.String def)
Get the name for the file indicated by the provided property. |
void |
initialize(httpd server)
Initialize this logger for the given server. |
void |
log(Request request,
Reply reply,
int nbytes,
long duration)
Log the given HTTP transaction. |
void |
log(java.lang.String msg)
|
protected void |
logmsg(java.lang.String msg)
|
protected void |
openErrorLogFile()
Open this logger error log file. |
protected void |
openLogFile()
Open this logger log file. |
protected void |
openTraceFile()
Open this logger trace file. |
protected void |
output(java.io.RandomAccessFile f,
java.lang.String msg)
Output the given message to the given RandomAccessFile. |
boolean |
propertyChanged(java.lang.String name)
Property monitoring for the logger. |
void |
shutdown()
Shutdown this logger. |
void |
sync()
Save all pending data to stable storage. |
void |
trace(Client client,
java.lang.String msg)
|
void |
trace(java.lang.String msg)
|
protected void |
tracemsg(java.lang.String msg)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String LOGNAME_P
This property defaults to the log
file in the server
log directory.
public static final java.lang.String ERRLOGNAME_P
This property defaults to the errlog
file in the
server log directory.
public static final java.lang.String TRACELOGNAME_P
This property defaults to the trace
file in the
server log directory.
public static final java.lang.String BUFSIZE_P
This property default to 4096.
protected java.io.RandomAccessFile log
protected java.io.RandomAccessFile errlog
protected java.io.RandomAccessFile trace
protected httpd server
protected ObservableProperties props
protected java.lang.String logdir
protected int bufsize
protected int bufptr
protected byte[] buffer
Method Detail |
public boolean propertyChanged(java.lang.String name)
name
- The name of the property that has changed.protected void output(java.io.RandomAccessFile f, java.lang.String msg) throws java.io.IOException
f
- The RandomAccessFile to write to, which should be one of
log, errlog or trace.msg
- The message to be written.protected void appendLogBuffer(java.lang.String msg) throws java.io.IOException
protected void logmsg(java.lang.String msg)
protected void errlogmsg(java.lang.String msg)
protected void tracemsg(java.lang.String msg)
public void log(Request request, Reply reply, int nbytes, long duration)
public void log(java.lang.String msg)
public void errlog(Client client, java.lang.String msg)
public void errlog(java.lang.String msg)
public void trace(Client client, java.lang.String msg)
public void trace(java.lang.String msg)
protected java.lang.String getFilename(java.lang.String propname, java.lang.String def)
This method shall either succeed in getting a filename, or throw a runtime exception.
propname
- The name of the property.def
- The default file name to use.protected void openLogFile()
protected void openErrorLogFile()
protected void openTraceFile()
public void sync()
public void shutdown()
public void initialize(httpd server)
server
- The server to which thiss logger should initialize.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |