Log4jConfig (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.plugins.log4j

## [Groovy] Class Log4jConfig

- org.codehaus.groovy.grails.plugins.log4j.Log4jConfig

- Encapsulates the configuration of Log4j.

  Authors:
    Graeme Rocher
  Since:
    1.1

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static java.lang.Object` | `APPENDERS`
    `static org.apache.log4j.PatternLayout` | `DEFAULT_PATTERN_LAYOUT`
    `static java.util.Map<java.lang.String, java.lang.Class<org.apache.log4j.Layout>>` | `LAYOUTS`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `Log4jConfig (groovy.util.ConfigObject config)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.lang.Object` | `all(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `all(java.lang.Object[] packages)`
    `java.lang.Object` | `appender(java.util.Map name, org.apache.log4j.Appender instance)`
    `java.lang.Object` | `appender(org.apache.log4j.Appender instance)`
    `java.lang.Object` | `appenders(groovy.lang.Closure callable)`
    `java.lang.Object` | `configure()`
    `java.lang.Object` | `configure(java.util.Map callables)` Configure Log4J from a map whose values are DSL closures.
    `java.lang.Object` | `configure(java.util.Collection callables)` Configure Log4J from a collection of DSL closures by calling the closures one after another in sequence.
    `java.lang.Object` | `configure(groovy.lang.Closure callable)`
    `java.lang.Object` | `debug(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `debug(java.lang.Object[] packages)`
    `java.lang.Object` | `eachLogger(java.lang.Object packages, groovy.lang.Closure callable)`
    `java.lang.Object` | `environments(groovy.lang.Closure callable)`
    `java.lang.Object` | `error(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `error(java.lang.Object[] packages)`
    `java.lang.Object` | `fatal(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `fatal(java.lang.Object[] packages)`
    `java.lang.Object` | `info(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `info(java.lang.Object[] packages)`
    `static void` | `initialiseDefaultLog4jConfiguration()`
    `static void` | `initialize(groovy.util.ConfigObject config)`
    `java.lang.Object` | `invokeCallable(groovy.lang.Closure callable)`
    `java.lang.Object` | `methodMissing(java.lang.String name, java.lang.Object args)`
    `java.lang.Object` | `off(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `off(java.lang.Object[] packages)`
    `void` | `populate(org.apache.log4j.Appender appender, java.util.Map args)`
    `java.lang.Object` | `propertyMissing(java.lang.String name)`
    `java.lang.Object` | `removeAppender(java.lang.String name)`
    `org.apache.log4j.Logger` | `root(groovy.lang.Closure c)`
    `java.lang.Object` | `trace(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `trace(java.lang.Object[] packages)`
    `java.lang.Object` | `warn(java.util.Map appenderAndPackages)`
    `java.lang.Object` | `warn(java.lang.Object[] packages)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Property Detail

    - #### static final java.lang.Object APPENDERS

    - #### static final org.apache.log4j.PatternLayout DEFAULT_PATTERN_LAYOUT

    - #### static final java.util.Map<java.lang.String, java.lang.Class<org.apache.log4j.Layout>> LAYOUTS

  - ### Constructor Detail

    - #### Log4jConfig(groovy.util.ConfigObject config)

  - ### Method Detail

    - #### @groovy.transform.CompileStatic java.lang.Object all(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object all(java.lang.Object[] packages)

    - #### java.lang.Object appender(java.util.Map name, org.apache.log4j.Appender instance)

    - #### java.lang.Object appender(org.apache.log4j.Appender instance)

    - #### @groovy.transform.CompileStatic java.lang.Object appenders(groovy.lang.Closure callable)

    - #### java.lang.Object configure()

    - #### @groovy.transform.CompileStatic java.lang.Object configure(java.util.Map callables)

      Configure Log4J from a map whose values are DSL closures. This simply calls the closures in the order they come out of the map's iterator. This is to allow configuration like:

           log4j.main = {
               // main Log4J configuration in Config.groovy
           }

           log4j.extra = {
               // additional Log4J configuration in an external config file
           }

      In this situation, `config.log4j` is a ConfigObject, which is an extension of LinkedHashMap, and thus returns its sub-keys in order of definition.

    - #### java.lang.Object configure(java.util.Collection callables)

      Configure Log4J from a collection of DSL closures by calling the closures one after another in sequence.

    - #### @groovy.transform.CompileStatic java.lang.Object configure(groovy.lang.Closure callable)

    - #### @groovy.transform.CompileStatic java.lang.Object debug(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object debug(java.lang.Object[] packages)

    - #### @groovy.transform.CompileStatic java.lang.Object eachLogger(java.lang.Object packages, groovy.lang.Closure callable)

    - #### @groovy.transform.CompileStatic java.lang.Object environments(groovy.lang.Closure callable)

    - #### @groovy.transform.CompileStatic java.lang.Object error(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object error(java.lang.Object[] packages)

    - #### @groovy.transform.CompileStatic java.lang.Object fatal(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object fatal(java.lang.Object[] packages)

    - #### @groovy.transform.CompileStatic java.lang.Object info(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object info(java.lang.Object[] packages)

    - #### @groovy.transform.CompileStatic static void initialiseDefaultLog4jConfiguration()

    - #### @groovy.transform.CompileStatic static void initialize(groovy.util.ConfigObject config)

    - #### @groovy.transform.CompileStatic java.lang.Object invokeCallable(groovy.lang.Closure callable)

    - #### java.lang.Object methodMissing(java.lang.String name, java.lang.Object args)

    - #### @groovy.transform.CompileStatic java.lang.Object off(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object off(java.lang.Object[] packages)

    - #### @groovy.transform.CompileStatic void populate(org.apache.log4j.Appender appender, java.util.Map args)

    - #### @groovy.transform.CompileStatic java.lang.Object propertyMissing(java.lang.String name)

    - #### java.lang.Object removeAppender(java.lang.String name)

    - #### @groovy.transform.CompileStatic org.apache.log4j.Logger root(groovy.lang.Closure c)

    - #### @groovy.transform.CompileStatic java.lang.Object trace(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object trace(java.lang.Object[] packages)

    - #### @groovy.transform.CompileStatic java.lang.Object warn(java.util.Map appenderAndPackages)

    - #### @groovy.transform.CompileStatic java.lang.Object warn(java.lang.Object[] packages)