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 of `IgniteLogger`. Grid logger is provided to grid via `IgniteConfiguration`.

  Logger can be injected into instances of following classes:

  - `ComputeTask`
  - `ComputeJob`
  - `IgniteSpi`
  - `LifecycleBean`

  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.

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element | Description
    --- | --- | ---
    `Class` | `categoryClass` | Optional log category class.
    `String` | `categoryName` | Optional log category name.

- - ### Element Detail

    - #### categoryClass

          Class categoryClass

      Optional log category class. If not provided (i.e. by default `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.

      Returns:
        Category class of the injected logger.
      Default:
        java.lang.Void.class

  - - #### categoryName

          String categoryName

      Optional log category name. If not provided, then `categoryClass()` value will be used.

      Either `categoryName` or `categoryClass()` can be provided, by not both.

      Returns:
        Category name for the injected logger.
      Default:
        ""