Package org.apache.ignite.logger.slf4j
Class Slf4jLogger
- java.lang.Object
-
- org.apache.ignite.logger.slf4j.Slf4jLogger
-
- All Implemented Interfaces:
IgniteLogger
public class Slf4jLogger extends Object implements IgniteLogger
SLF4J-based implementation for logging. This logger should be used by loaders that have prefer slf4j-based logging.Here is an example of configuring SLF4J logger in Ignite configuration Spring file:
<property name="gridLogger"> <bean class="org.apache.ignite.logger.slf4j.Slf4jLogger"/> </property>It's recommended to use Ignite's logger injection instead of using/instantiating logger in your task/job code. See
LoggerResourceannotation about logger injection.
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.IgniteLogger
DEV_ONLY
-
-
Constructor Summary
Constructors Constructor Description Slf4jLogger()Creates new logger.Slf4jLogger(org.slf4j.Logger impl)Creates new logger with given implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(@Nullable String marker, String msg)voiddebug(String msg)voiderror(@Nullable String marker, String msg, @Nullable Throwable e)voiderror(String msg, @Nullable Throwable e)@Nullable StringfileName()Slf4jLoggergetLogger(Object ctgr)voidinfo(@Nullable String marker, String msg)voidinfo(String msg)booleanisDebugEnabled()booleanisInfoEnabled()booleanisQuiet()booleanisTraceEnabled()StringtoString()voidtrace(@Nullable String marker, String msg)voidtrace(String msg)voidwarning(@Nullable String marker, String msg, @Nullable Throwable e)voidwarning(String msg, @Nullable Throwable e)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.IgniteLogger
error, warning
-
-
-
-
Method Detail
-
getLogger
public Slf4jLogger getLogger(Object ctgr)
- Specified by:
getLoggerin interfaceIgniteLogger
-
trace
public void trace(String msg)
- Specified by:
tracein interfaceIgniteLogger
-
trace
public void trace(@Nullable @Nullable String marker, String msg)- Specified by:
tracein interfaceIgniteLogger
-
debug
public void debug(String msg)
- Specified by:
debugin interfaceIgniteLogger
-
debug
public void debug(@Nullable @Nullable String marker, String msg)- Specified by:
debugin interfaceIgniteLogger
-
info
public void info(String msg)
- Specified by:
infoin interfaceIgniteLogger
-
info
public void info(@Nullable @Nullable String marker, String msg)- Specified by:
infoin interfaceIgniteLogger
-
warning
public void warning(String msg, @Nullable @Nullable Throwable e)
- Specified by:
warningin interfaceIgniteLogger
-
warning
public void warning(@Nullable @Nullable String marker, String msg, @Nullable @Nullable Throwable e)- Specified by:
warningin interfaceIgniteLogger
-
error
public void error(String msg, @Nullable @Nullable Throwable e)
- Specified by:
errorin interfaceIgniteLogger
-
error
public void error(@Nullable @Nullable String marker, String msg, @Nullable @Nullable Throwable e)- Specified by:
errorin interfaceIgniteLogger
-
isTraceEnabled
public boolean isTraceEnabled()
- Specified by:
isTraceEnabledin interfaceIgniteLogger
-
isInfoEnabled
public boolean isInfoEnabled()
- Specified by:
isInfoEnabledin interfaceIgniteLogger
-
isDebugEnabled
public boolean isDebugEnabled()
- Specified by:
isDebugEnabledin interfaceIgniteLogger
-
isQuiet
public boolean isQuiet()
- Specified by:
isQuietin interfaceIgniteLogger
-
fileName
@Nullable public @Nullable String fileName()
- Specified by:
fileNamein interfaceIgniteLogger
-
-