Package: groovy.org.codenarc.rule.logging

## [Groovy] Class LoggerForDifferentClassRule

- groovy.org.codenarc.rule.logging.LoggerForDifferentClassRule

- Rule that checks for instantiating a logger for a class other than the current class. Supports logger instantiations for Log4J, Logback, SLF4J, Apache Commons Logging, Java Logging API (java.util.logging). Limitations:

  - Only checks Loggers instantiated within a class field or property (not variables or expressions within a method)
  - For Log4J: Does not catch Logger instantiations if you specify the full package name for the Logger class: e.g. org.apache.log4.Logger.getLogger(..)
  - For SLF4J and Logback: Does not catch Log instantiations if you specify the full package name for the LoggerFactory class: e.g. org.slf4j.LoggerFactory.getLogger(..)
  - For Commons Logging: Does not catch Log instantiations if you specify the full package name for the LogFactory class: e.g. org.apache.commons.logging.LogFactory.getLog(..)
  - For Java Logging API: Does not catch Logger instantiations if you specify the full package name for the Logger class: e.g. java.util.logging.Logger.getLogger(..)
  Authors:
    Chris Mair

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `boolean` | `allowDerivedClasses`
    `Class` | `astVisitorClass`
    `String` | `name`
    `int` | `priority`

- - ### Property Detail

    - #### boolean allowDerivedClasses

    - #### Class astVisitorClass

    - #### String name

    - #### int priority