glassfish
  1. glassfish
  2. GLASSFISH-19323

log service should only add handlers configures in j.u.l. logging.properties file.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b62_ms6
    • Fix Version/s: 4.0_b73
    • Component/s: logging
    • Labels:
      None

      Description

      Currently gf log service adds any HK2 service that has a contract of type j.u.l.Handler. Instead, it should only add those handlers that are explicitly configured in handlers property in logging.properties file. Mind you, it still has to discover the handlers using HK2 service locator otherwise it would fail to load handler classes from modules.

        Activity

        Hide
        sandeep.shrivastava added a comment -

        Committed revision 59320.

        Show
        sandeep.shrivastava added a comment - Committed revision 59320.
        Hide
        sandeep.shrivastava added a comment -

        Users will be able to configure custom handlers in two ways.

        1. Implement a java.util.logging.Handler and include it in a jar which is dropped in the domain/lib/ext dir. They can configure the handlers property in the logging.properties file to attach the handler to the root logger.

        2. Implement a Handler as a java.util.logging.Handler HK2 Service and deploy an OSGI module. Such handlers can be configured by the specifying the handlerServices property in the logging.properties file.

        These 2 usage patterns will need to be documented.

        Show
        sandeep.shrivastava added a comment - Users will be able to configure custom handlers in two ways. 1. Implement a java.util.logging.Handler and include it in a jar which is dropped in the domain/lib/ext dir. They can configure the handlers property in the logging.properties file to attach the handler to the root logger. 2. Implement a Handler as a java.util.logging.Handler HK2 Service and deploy an OSGI module. Such handlers can be configured by the specifying the handlerServices property in the logging.properties file. These 2 usage patterns will need to be documented.
        Hide
        sandeep.shrivastava added a comment -

        Looks like this is a documented feature.

        http://docs.oracle.com/cd/E18930_01/html/821-2416/gklmn.html#ghmen

        We are thinking of defining a separate properties called handlerServices in the logging.properties file where such Hk2 handlers can be registered explicitly. These handler services will be attached to the root logger.

        This may affect existing users of this feature, so we will need to release note it.

        Show
        sandeep.shrivastava added a comment - Looks like this is a documented feature. http://docs.oracle.com/cd/E18930_01/html/821-2416/gklmn.html#ghmen We are thinking of defining a separate properties called handlerServices in the logging.properties file where such Hk2 handlers can be registered explicitly. These handler services will be attached to the root logger. This may affect existing users of this feature, so we will need to release note it.
        Hide
        sandeep.shrivastava added a comment -

        Sahoo,

        Please provide further clarification as per prior post.

        Thanks

        Sandeep

        Show
        sandeep.shrivastava added a comment - Sahoo, Please provide further clarification as per prior post. Thanks Sandeep
        Hide
        sandeep.shrivastava added a comment -

        Sanjeeb,

        Can you provide further details on the use case and the problem caused by this behavior? Please
        note that there might be some compatibility concerns if we change the functionality as per your request as some folks may be implicitly relying on the Handler to be added automatically via the Service discovery.

        Thanks

        Sandeep

        Show
        sandeep.shrivastava added a comment - Sanjeeb, Can you provide further details on the use case and the problem caused by this behavior? Please note that there might be some compatibility concerns if we change the functionality as per your request as some folks may be implicitly relying on the Handler to be added automatically via the Service discovery. Thanks Sandeep

          People

          • Assignee:
            sandeep.shrivastava
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: