|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.click.extras.service.Slf4jLogService
public class Slf4jLogService
Provides a SLF4J LogService adapter class with a logger name of "Click".
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <click-app charset="UTF-8"> <pages package="org.apache.click.examples.page"/> <log-service classname="org.apache.click.extras.service.Slf4jLogService"/> </click-app>
Field Summary | |
---|---|
protected org.slf4j.Logger |
logger
The wrapped JDK logger instance. |
protected String |
name
The logger category name. |
Constructor Summary | |
---|---|
Slf4jLogService()
|
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.slf4j.Logger logger
protected String name
Constructor Detail |
---|
public Slf4jLogService()
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 |