|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@GridToStringExclude public interface GridLogger
This 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, log4j, JBoss, JCL and console logging are provided as supported implementations.
GridGain logger could be configured either from code (for example log4j logger):
GridConfiguration cfg = new GridConfigurationAdapter();
...
URL xml = U.resolveGridGainUrl("modules/tests/config/log4j-test.xml");
GridLogger log = new GridLog4jLogger(xml);
...
cfg.setGridLogger(log);
or in grid configuration file (see JCL logger example below):
...
<property name="gridLogger">
<bean class="org.gridgain.grid.logger.jcl.GridJclLogger">
<constructor-arg type="org.apache.commons.logging.Log">
<bean class="org.apache.commons.logging.impl.Log4JLogger">
<constructor-arg type="java.lang.String" value="config/default-log4j.xml"/>
</bean>
</constructor-arg>
</bean>
</property>
...
It's recommended to use GridGain's logger injection instead of using/instantiating
logger in your task/job code. See GridLoggerResource annotation about logger
injection.
INFO and DEBUG
log output. If system property GRIDGAIN_QUIET is set to false than GridGain
will operate in normal un-suppressed logging mode. Note that all output in "quiet" mode is
done through standard output (STDOUT).
Note that GridGain's standard startup scripts $GRIDGAIN_HOME/bin/ggstart.{sh|bat} start
by default in "quiet" mode. Both scripts accept -v arguments to turn off "quiet" mode.
| Wiki | |
| Forum |

| Method Summary | |
|---|---|
void |
debug(String msg)
Logs out debug message. |
void |
error(String msg)
Logs out error message. |
void |
error(String msg,
Throwable e)
Logs error message with optional exception. |
GridLogger |
getLogger(Object ctgr)
Creates new logger with given category based off the current instance. |
void |
info(String msg)
Logs out information message. |
boolean |
isDebugEnabled()
Tests whether debug level is enabled. |
boolean |
isInfoEnabled()
Tests whether info level is enabled. |
boolean |
isQuiet()
Tests whether info and debug levels are turned off. |
void |
warning(String msg)
Logs out warning message. |
void |
warning(String msg,
Throwable e)
Logs out warning message with optional exception. |
| Methods inherited from interface org.gridgain.grid.GridMetadataAware |
|---|
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta |
| Method Detail |
|---|
GridLogger getLogger(Object ctgr)
ctgr - Category for new logger.
void debug(String msg)
msg - Debug message.void info(String msg)
msg - Information message.void warning(String msg)
msg - Warning message.
void warning(String msg,
@Nullable
Throwable e)
msg - Warning message.e - Optional exception (can be null).void error(String msg)
msg - Error message.
void error(String msg,
@Nullable
Throwable e)
msg - Error message.e - Optional exception (can be null).boolean isDebugEnabled()
debug level is enabled.
true in case when debug level is enabled, false otherwise.boolean isInfoEnabled()
info level is enabled.
true in case when info level is enabled, false otherwise.boolean isQuiet()
info and debug levels are turned off.
info and debug levels are turned off.
|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Real Time Big Data
|
|
|