Log4j 2
  1. Log4j 2
  2. LOG4J2-15

Provide a "Proxy" Appender to support lazy initialization of Appenders.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-alpha1
    • Component/s: Appenders
    • Labels:
      None

      Description

      In the environment I work in we share the logging configuration across several JVMs. Some Appender definitions might not apply to a particular JVM. Rather than requiring the classes for the actual appender be available during initialization we had our own logging framework that supported Appender creation the first time it was published to. This can be accomplished by configuring a Proxy and the actual Appender under the proxy.

        Activity

        Ralph Goers created issue -
        Hide
        Ralph Goers added a comment -

        In the experimental version of Log4j 2.0 the RoutingAppender suppprts dynamic creation of Appenders. In theory, the Configuration supports lazy initialization of any component simply by marking the Plugin with deferChildren = true.

        Show
        Ralph Goers added a comment - In the experimental version of Log4j 2.0 the RoutingAppender suppprts dynamic creation of Appenders. In theory, the Configuration supports lazy initialization of any component simply by marking the Plugin with deferChildren = true.
        Hide
        Ralph Goers added a comment -

        In addition to deferring the way the RoutingAppender does most Appenders use Managers. The Managers are free to defer processing until it is required.

        Show
        Ralph Goers added a comment - In addition to deferring the way the RoutingAppender does most Appenders use Managers. The Managers are free to defer processing until it is required.
        Ralph Goers made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Ralph Goers [ ralph.goers@dslextreme.com ]
        Fix Version/s 2.0-alpha1 [ 12320347 ]
        Resolution Fixed [ 1 ]
        Hide
        Sudharma Puranik added a comment -

        I tried using it but it doesnot work. I made the deferChildren=true but it says an error like . I have provided the Triggering policy already.

        A TriggeringPolicy must be provided
        2013-11-15 12:33:09,765 ERROR Unable to create Appender of type RollingRandomAccessFile

        Show
        Sudharma Puranik added a comment - I tried using it but it doesnot work. I made the deferChildren=true but it says an error like . I have provided the Triggering policy already. A TriggeringPolicy must be provided 2013-11-15 12:33:09,765 ERROR Unable to create Appender of type RollingRandomAccessFile

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Ralph Goers
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development