@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface LoggerResource
IgniteLogger
. Grid logger is provided to grid
via IgniteConfiguration
.
Logger can be injected into instances of following classes:
WARNING: unlike other injectable resources, logger resources won't be cleaned on node stop!
Here is how injection would typically happen:
public class MyGridJob implements ComputeJob { ... @LoggerResource private IgniteLogger log; ... }or
public class MyGridJob implements ComputeJob { ... private Ignite log; ... @LoggerResource public void setGridLogger(IgniteLogger log) { this.log = log; } ... }
See IgniteConfiguration.getGridLogger()
for Grid configuration details.
Modifier and Type | Optional Element and Description |
---|---|
Class |
categoryClass
Optional log category class.
|
String |
categoryName
Optional log category name.
|
public abstract Class categoryClass
Void
class is returned), then the category will
be the class into which resource is assigned.
Either categoryClass
or categoryName()
can be provided,
by not both.
public abstract String categoryName
categoryClass()
value will be used.
Either categoryName
or categoryClass()
can be provided,
by not both.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024