@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface GridLoggerResource
GridLogger. Grid logger is provided to grid
via GridConfiguration.
Logger can be injected into instances of following classes:
Here is how injection would typically happen:
public class MyGridJob implements GridComputeJob {
...
@GridLoggerResource
private GridLogger log;
...
}
or
public class MyGridJob implements GridComputeJob {
...
private GridLogger log;
...
@GridLoggerResource
public void setGridLogger(GridLogger log) {
this.log = log;
}
...
}
See GridConfiguration.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.
Copyright © 2014. All rights reserved.