|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.click.extras.service.Log4JLogService
Provides a Log4J LogService adapter class. This logger will use the category name of "Click".
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <click-app charset="UTF-8"> <pages package="net.sf.click.examples.page"/> <log-service classname="net.sf.click.extras.service.Log4JLogService"/> </click-app>
Field Summary | |
protected org.apache.log4j.Logger |
logger
The wrapped Log4J logger instance. |
protected String |
name
The logger category name. |
Constructor Summary | |
Log4JLogService()
|
Method Summary | |
void |
debug(Object message)
|
void |
debug(Object message,
Throwable error)
|
void |
error(Object message)
|
void |
error(Object message,
Throwable error)
|
String |
getName()
Return the logger category name. |
void |
info(Object message)
|
void |
info(Object message,
Throwable error)
|
boolean |
isDebugEnabled()
|
boolean |
isInfoEnabled()
|
boolean |
isTraceEnabled()
|
void |
onDestroy()
|
void |
onInit(ServletContext servletContext)
|
void |
setName(String name)
The logger category name. |
void |
trace(Object message)
|
void |
trace(Object message,
Throwable error)
|
void |
warn(Object message)
|
void |
warn(Object message,
Throwable error)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.log4j.Logger logger
protected String name
Constructor Detail |
public Log4JLogService()
Method Detail |
public void onInit(ServletContext servletContext) throws Exception
onInit
in interface LogService
servletContext
- the application servlet context
Exception
- if an error occurs initializing the LogServiceLogService.onInit(javax.servlet.ServletContext)
public void onDestroy()
onDestroy
in interface LogService
LogService.onDestroy()
public void debug(Object message)
debug
in interface LogService
message
- the message to logLogService.debug(Object)
public void debug(Object message, Throwable error)
debug
in interface LogService
message
- the message to logerror
- the error to logLogService.debug(Object, Throwable)
public void error(Object message)
error
in interface LogService
message
- the message to logLogService.error(Object)
public void error(Object message, Throwable error)
error
in interface LogService
message
- the message to logerror
- the error to logLogService.error(Object, Throwable)
public void info(Object message)
info
in interface LogService
message
- the message to logLogService.info(Object)
public void info(Object message, Throwable error)
info
in interface LogService
message
- the message to logerror
- the error to logLogService.info(Object, Throwable)
public boolean isDebugEnabled()
isDebugEnabled
in interface LogService
LogService.isDebugEnabled()
public boolean isInfoEnabled()
isInfoEnabled
in interface LogService
LogService.isInfoEnabled()
public boolean isTraceEnabled()
isTraceEnabled
in interface LogService
LogService.isTraceEnabled()
public void trace(Object message)
trace
in interface LogService
message
- the message to logLogService.trace(Object)
public void trace(Object message, Throwable error)
trace
in interface LogService
message
- the message to logerror
- the error to logLogService.trace(Object, Throwable)
public void warn(Object message)
warn
in interface LogService
message
- the message to logLogService.warn(Object)
public void warn(Object message, Throwable error)
warn
in interface LogService
message
- the message to logerror
- the error to logLogService.warn(Object, Throwable)
public String getName()
public void setName(String name)
name
- the logger category name to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |