Class Slf4jLogWriter
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.logging.Slf4jLogWriter
-
-
Constructor Summary
Constructors Constructor Description Slf4jLogWriter(Logger log)
Create a new instance which uses the passed SLF4J logger for persisting the log messages.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enter(java.lang.String methodName, java.lang.Object[] args)
Logs the call at debug level is debug level is enabled.void
error(java.lang.String methodName, java.lang.Object[] args, java.lang.Exception e)
Logs the exception including a stack trace at debug level is debug level is enabled.void
leave(java.lang.String methodName, java.lang.Object[] args, java.lang.Object result)
Logs the call at debug level is debug level is enabled.long
systemTime()
Returns
-
-
-
Constructor Detail
-
Slf4jLogWriter
public Slf4jLogWriter(Logger log)
Create a new instance which uses the passed SLF4J logger for persisting the log messages.- Parameters:
log
-
-
-
Method Detail
-
systemTime
public long systemTime()
ReturnsSystem.currentTimeMillis();
Implementation specific time stamp which is logged along with each log message. The values returned by this method should be monotone with respect to the time they represent.- Specified by:
systemTime
in interfaceLogWriter
- Returns:
-
enter
public void enter(java.lang.String methodName, java.lang.Object[] args)
Logs the call at debug level is debug level is enabled. Called right before a method of a SPI entity is called.
-
leave
public void leave(java.lang.String methodName, java.lang.Object[] args, java.lang.Object result)
Logs the call at debug level is debug level is enabled. Called right after a method of a SPI entity has been called if no exception was thrown.
-
error
public void error(java.lang.String methodName, java.lang.Object[] args, java.lang.Exception e)
Logs the exception including a stack trace at debug level is debug level is enabled. Called right after a method of a SPI entity has been called and an exception was thrown.
-
-