Package org.apache.ignite
Interface IgniteLogger
- 
- All Known Implementing Classes:
- JavaLogger,- JclLogger,- Log4J2Logger,- NullLogger,- Slf4jLogger
 
 @GridToStringExclude public interface IgniteLoggerThis interface defines basic logging functionality used throughout the system. We had to abstract it out so that we can use whatever logging is used by the hosting environment. Currently, log4j2, JBoss, JCL and console logging are provided as supported implementations.Ignite logger could be configured either from code (for example log4j2 logger): IgniteConfiguration cfg = new IgniteConfiguration(); ... URL xml = U.resolveIgniteUrl("config/custom-log4j.xml"); IgniteLogger log = new Log4J2Logger(xml); ... cfg.setGridLogger(log);or in grid configuration file (see JCL logger example below):... <property name="gridLogger"> <bean class="org.apache.ignite.logger.jcl.JclLogger"> <constructor-arg type="org.apache.commons.logging.Log"> <bean class="org.apache.commons.logging.impl.Log4J2Logger"> <constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/> </bean> </constructor-arg> </bean> </property> ...It's recommended to use Ignite's logger injection instead of using/instantiating logger in your task/job code. SeeLoggerResourceannotation about logger injection.Quiet ModeBy default Ignite starts in "quiet" mode suppressingINFOandDEBUGlog output. If system propertyIGNITE_QUIETis set tofalsethan Ignition will operate in normal un-suppressed logging mode. Note that all output in "quiet" mode is done through standard output (STDOUT).Note that Ignite's standard startup scripts $IGNITE_HOME/bin/ignite.{sh|bat} start by default in "quiet" mode. Both scripts accept -varguments to turn off "quiet" mode.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddebug(@Nullable String marker, String msg)Logs out debug message.voiddebug(String msg)Logs out debug message.default voiderror(@Nullable String marker, String msg, @Nullable Throwable e)Logs error message with optional exception.default voiderror(String msg)Logs out error message.voiderror(String msg, @Nullable Throwable e)Logs error message with optional exception.StringfileName()Gets name of the file being logged to if one is configured ornullotherwise.IgniteLoggergetLogger(Object ctgr)Creates new logger with given category based off the current instance.default voidinfo(@Nullable String marker, String msg)Logs out information message.voidinfo(String msg)Logs out information message.booleanisDebugEnabled()Tests whetherdebuglevel is enabled.booleanisInfoEnabled()Tests whetherinfolevel is enabled.booleanisQuiet()Tests whether Logger is in "Quiet mode".booleanisTraceEnabled()Tests whethertracelevel is enabled.default voidtrace(@Nullable String marker, String msg)Logs out trace message.voidtrace(String msg)Logs out trace message.default voidwarning(@Nullable String marker, String msg, @Nullable Throwable e)Logs out warning message with optional exception.default voidwarning(String msg)Logs out warning message.voidwarning(String msg, @Nullable Throwable e)Logs out warning message with optional exception.
 
- 
- 
- 
Field Detail- 
DEV_ONLYstatic final String DEV_ONLY Marker for log messages that are useful in development environments, but not in production.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getLoggerIgniteLogger getLogger(Object ctgr) Creates new logger with given category based off the current instance.- Parameters:
- ctgr- Category for new logger.
- Returns:
- New logger with given category.
 
 - 
tracevoid trace(String msg) Logs out trace message.- Parameters:
- msg- Trace message.
 
 - 
tracedefault void trace(@Nullable @Nullable String marker, String msg)Logs out trace message. The default implementation callsthis.trace(msg).- Parameters:
- marker- Name of the marker to be associated with the message.
- msg- Trace message.
 
 - 
debugvoid debug(String msg) Logs out debug message.- Parameters:
- msg- Debug message.
 
 - 
debugdefault void debug(@Nullable @Nullable String marker, String msg)Logs out debug message. The default implementation callsthis.debug(msg).- Parameters:
- marker- Name of the marker to be associated with the message.
- msg- Debug message.
 
 - 
infovoid info(String msg) Logs out information message.- Parameters:
- msg- Information message.
 
 - 
infodefault void info(@Nullable @Nullable String marker, String msg)Logs out information message. The default implementation callsthis.info(msg).- Parameters:
- marker- Name of the marker to be associated with the message.
- msg- Information message.
 
 - 
warningdefault void warning(String msg) Logs out warning message.- Parameters:
- msg- Warning message.
 
 - 
warningvoid warning(String msg, @Nullable @Nullable Throwable e) Logs out warning message with optional exception.- Parameters:
- msg- Warning message.
- e- Optional exception (can be- null).
 
 - 
warningdefault void warning(@Nullable @Nullable String marker, String msg, @Nullable @Nullable Throwable e)Logs out warning message with optional exception. The default implementation callsthis.warning(msg).- Parameters:
- marker- Name of the marker to be associated with the message.
- msg- Warning message.
- e- Optional exception (can be- null).
 
 - 
errordefault void error(String msg) Logs out error message.- Parameters:
- msg- Error message.
 
 - 
errorvoid error(String msg, @Nullable @Nullable Throwable e) Logs error message with optional exception.- Parameters:
- msg- Error message.
- e- Optional exception (can be- null).
 
 - 
errordefault void error(@Nullable @Nullable String marker, String msg, @Nullable @Nullable Throwable e)Logs error message with optional exception. The default implementation callsthis.error(msg).- Parameters:
- marker- Name of the marker to be associated with the message.
- msg- Error message.
- e- Optional exception (can be- null).
 
 - 
isTraceEnabledboolean isTraceEnabled() Tests whethertracelevel is enabled.- Returns:
- truein case when- tracelevel is enabled,- falseotherwise.
 
 - 
isDebugEnabledboolean isDebugEnabled() Tests whetherdebuglevel is enabled.- Returns:
- truein case when- debuglevel is enabled,- falseotherwise.
 
 - 
isInfoEnabledboolean isInfoEnabled() Tests whetherinfolevel is enabled.- Returns:
- truein case when- infolevel is enabled,- falseotherwise.
 
 - 
isQuietboolean isQuiet() Tests whether Logger is in "Quiet mode".- Returns:
- true"Quiet mode" is enabled,- falseotherwise
 
 - 
fileNameString fileName() Gets name of the file being logged to if one is configured ornullotherwise.- Returns:
- Name of the file being logged to if one is configured or nullotherwise.
 
 
- 
 
-