com.devsphere.logging
Class ServletLogger
java.lang.Object
|
+--com.devsphere.logging.AbstractLogger
|
+--com.devsphere.logging.ServletLogger
- public class ServletLogger
- extends AbstractLogger
Logging mechanisms for servlets.
- See Also:
AbstractLogger
Constructor Summary |
ServletLogger(javax.servlet.ServletContext context)
Creates the servlet logger. |
Method Summary |
void |
close()
This method does nothing. |
void |
flush()
This method does nothing. |
void |
log(java.lang.String message)
Logs a message. |
void |
log(java.lang.String message,
java.lang.Throwable throwable)
Logs a message and an exception. |
void |
log(java.lang.Throwable throwable)
Logs an exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletLogger
public ServletLogger(javax.servlet.ServletContext context)
- Creates the servlet logger.
- Parameters:
context
- the servlet context used for logging.- Throws:
NullPointerException
- if context
is null
.
log
public void log(java.lang.String message)
- Logs a message.
- Overrides:
log
in class AbstractLogger
- Parameters:
message
- the message that has to be logged.
log
public void log(java.lang.Throwable throwable)
- Logs an exception.
- Overrides:
log
in class AbstractLogger
- Parameters:
throwable
- the exception that has to be logged.
log
public void log(java.lang.String message,
java.lang.Throwable throwable)
- Logs a message and an exception.
- Overrides:
log
in class AbstractLogger
- Parameters:
message
- the message that has to be logged.throwable
- the exception that has to be logged.
flush
public void flush()
- This method does nothing.
- Overrides:
flush
in class AbstractLogger
close
public void close()
- This method does nothing.
- Overrides:
close
in class AbstractLogger