|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Apache20LicenseCompatible @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();
...
File xml = GridUtils.resolveGridGainPath("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.
Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0

| 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. |
void |
warning(String msg)
Logs out warning message. |
void |
warning(String msg,
Throwable e)
Logs out warning message with optional exception. |
| 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,
Throwable e)
msg - Warning message.e - Optional exception (can be null).void error(String msg)
msg - Error message.
void error(String msg,
Throwable e)
msg - Error message.e - Optional exception (can be null).boolean isDebugEnabled()
boolean isInfoEnabled()
|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|
|