Log4j 2
  1. Log4j 2
  2. LOG4J2-20

log4j 2 should have clean separation of configuration from function

    Details

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

      Description

      log4j 1.2 does not enforce a clean separation between configuration and service provision. Some configuration changes take effect immediately, some only on a call to activateOptions and rarely are they appropriately synchronized with the service provision. log4j 2.0 should have services provided by immutable or at least not externally immutable objects and keep configuration in distinct classes that construct the service providing instance and then replace the existing service with proper synchronization.

      This is related to prefer immutable classes

        Activity

        Hide
        Ralph Goers added a comment -

        In my experimental branch the configuration is separate from the loggers returned via LogManager.getLogger(). Once the configuration is active new Loggers (actually LoggerConfig objects) cannot be added to the configuration. Creating a new configuration is done in such a way that Loggers are never in an unconfigured state. However, adding a new Appender or Filter can be done as these operations can be performed safely.

        Show
        Ralph Goers added a comment - In my experimental branch the configuration is separate from the loggers returned via LogManager.getLogger(). Once the configuration is active new Loggers (actually LoggerConfig objects) cannot be added to the configuration. Creating a new configuration is done in such a way that Loggers are never in an unconfigured state. However, adding a new Appender or Filter can be done as these operations can be performed safely.
        Hide
        Ralph Goers added a comment -

        The plugin model used to instantiate configured components as well as how configuration is performed should address these concerns.

        Show
        Ralph Goers added a comment - The plugin model used to instantiate configured components as well as how configuration is performed should address these concerns.
        Hide
        Ralph Goers added a comment -

        Closing since there have been no updates to this issue since it was marked resolved.

        Show
        Ralph Goers added a comment - Closing since there have been no updates to this issue since it was marked resolved.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development