|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.jserv.JServLog
This class is used to trace and report errors and execution. Made it a delegating class in order to ignore errors opening the logfile (hen)
LogWriter
Field Summary | |
boolean |
active
|
private java.lang.String |
errorMessage
|
private LogWriter |
logger
|
Constructor Summary | |
JServLog(java.lang.String identifier,
Configurations confs)
Construct this class |
Method Summary | |
void |
flush()
Flush the log. |
java.lang.String |
getSubsystemError()
returns the last Error occured in this subsystem |
boolean |
isActive()
Tells if it is active. |
boolean |
isActive(java.lang.String channel)
Tells if the given channel is active. |
boolean |
isSane()
returns true if this subsystem is sane |
void |
log(java.lang.String channel,
java.lang.String message)
Prints the log message on the right channel. |
void |
log(java.lang.String channel,
java.lang.Throwable t)
Prints the error message and stack trace if channel enabled. |
void |
sendError(int sc,
java.lang.String msg)
Report a problem encountered while initializing. |
void |
sendError(java.lang.Throwable error)
Report an exception or error encountered while loading a servlet. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String errorMessage
private LogWriter logger
public boolean active
Constructor Detail |
public JServLog(java.lang.String identifier, Configurations confs)
Method Detail |
public boolean isActive()
public boolean isActive(java.lang.String channel)
channel
- the channel to test.public void log(java.lang.String channel, java.lang.String message)
A "channel" is a virtual log that may be enabled or disabled by setting the property "identifier".channel.???=true where ??? is the channel identifier that must be passed with the message. If a channel is not recognized or its property is set to false the message is not written.
channel
- the channel to put the message on.name
- the message to log.public void log(java.lang.String channel, java.lang.Throwable t)
t
- the error thrown.public void flush()
public void sendError(int sc, java.lang.String msg)
public void sendError(java.lang.Throwable error)
public java.lang.String getSubsystemError()
public boolean isSane()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |