Package org.apache.ignite.resources
Annotation Type LoggerResource
- 
 @Documented @Retention(RUNTIME) @Target({METHOD,FIELD}) public @interface LoggerResource Annotates a field or a setter method for injection ofIgniteLogger. Grid logger is provided to grid viaIgniteConfiguration.Logger can be injected into instances of following classes: Here is how injection would typically happen: public class MyGridJob implements ComputeJob { ... @LoggerResource private IgniteLogger log; ... }orpublic class MyGridJob implements ComputeJob { ... private Ignite log; ... @LoggerResource public void setGridLogger(IgniteLogger log) { this.log = log; } ... }See IgniteConfiguration.getGridLogger()for Grid configuration details.
- 
- 
Optional Element SummaryOptional Elements Modifier and Type Optional Element Description ClasscategoryClassOptional log category class.StringcategoryNameOptional log category name.
 
- 
- 
- 
Element Detail- 
categoryClassClass categoryClass Optional log category class. If not provided (i.e. by defaultVoidclass is returned), then the category will be the class into which resource is assigned.Either categoryClassorcategoryName()can be provided, by not both.- Returns:
- Category class of the injected logger.
 - Default:
- java.lang.Void.class
 
 
- 
 - 
- 
categoryNameString categoryName Optional log category name. If not provided, thencategoryClass()value will be used.Either categoryNameorcategoryClass()can be provided, by not both.- Returns:
- Category name for the injected logger.
 - Default:
- ""
 
 
- 
 
-