Class DynamicLocationAwareLogger
- java.lang.Object
-
- org.exoplatform.services.log.impl.DynamicLocationAwareLogger
-
public class DynamicLocationAwareLogger extends Object
This is an utility class allowing to use in runtime either 1.5.x or 1.6.x slf4j libraries. As their log method signature differs, we use reflection library to invoke it.- Author:
- Dmitry Kuleshov
-
-
Constructor Summary
Constructors Constructor Description DynamicLocationAwareLogger(org.slf4j.spi.LocationAwareLogger logger)Simple constructor with one parameter is used to pull out logMethodan determine which version of slf4j library is currently used.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDebugEnabled()booleanisErrorEnabled()booleanisFatalEnabled()booleanisInfoEnabled()booleanisTraceEnabled()booleanisWarnEnabled()voidlog(org.slf4j.Marker marker, String fqcn, int level, String message, Throwable t)Printing method with support for location information.
-
-
-
Constructor Detail
-
DynamicLocationAwareLogger
public DynamicLocationAwareLogger(org.slf4j.spi.LocationAwareLogger logger)
Simple constructor with one parameter is used to pull out logMethodan determine which version of slf4j library is currently used.- Parameters:
logger- location aware logger to be wrapped
-
-
Method Detail
-
log
public void log(org.slf4j.Marker marker, String fqcn, int level, String message, Throwable t)Printing method with support for location information. Encapsulates slf4j lib logMethodinvocation and passing it the correct parameters.
-
isDebugEnabled
public boolean isDebugEnabled()
-
isErrorEnabled
public boolean isErrorEnabled()
-
isFatalEnabled
public boolean isFatalEnabled()
-
isInfoEnabled
public boolean isInfoEnabled()
-
isTraceEnabled
public boolean isTraceEnabled()
-
isWarnEnabled
public boolean isWarnEnabled()
-
-